r5064: *** empty log message ***
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 7 Jun 2003 02:26:07 +0000 (02:26 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sat, 7 Jun 2003 02:26:07 +0000 (02:26 +0000)
lml-tests.asd [new file with mode: 0644]
tests.lisp [new file with mode: 0644]

diff --git a/lml-tests.asd b/lml-tests.asd
new file mode 100644 (file)
index 0000000..432c49d
--- /dev/null
@@ -0,0 +1,26 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          lml-tests.asd
+;;;; Purpose:       ASDF system definitionf for lml testing package
+;;;; Author:        Kevin M. Rosenberg
+;;;; Date Started:  Apr 2003
+;;;;
+;;;; $Id: lml-tests.asd,v 1.1 2003/06/07 02:26:07 kevin Exp $
+;;;; *************************************************************************
+
+(defpackage #:lml-tests-system
+  (:use #:asdf #:cl))
+(in-package #:lml-tests-system)
+
+(defsystem lml-tests
+    :depends-on (:rt :lml)
+    :components
+    ((:file "tests")))
+
+(defmethod perform ((o test-op) (c (eql (find-system 'lml-tests))))
+  (or (funcall (intern (symbol-name '#:do-tests)
+                      (find-package '#:regression-test)))
+      (error "test-op failed")))
+
diff --git a/tests.lisp b/tests.lisp
new file mode 100644 (file)
index 0000000..04012a7
--- /dev/null
@@ -0,0 +1,69 @@
+;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*-
+;;;; *************************************************************************
+;;;; FILE IDENTIFICATION
+;;;;
+;;;; Name:          lml-tests.lisp
+;;;; Purpose:       lml tests file
+;;;; Author:        Kevin M. Rosenberg
+;;;; Date Started:  Apr 2003
+;;;;
+;;;; $Id: tests.lisp,v 1.1 2003/06/07 02:26:07 kevin Exp $
+;;;;
+;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
+;;;;
+;;;; *************************************************************************
+
+(in-package #:cl)
+(defpackage #:lml-tests
+  (:use #:lml #:cl #:rtest))
+(in-package #:lml-tests)
+
+(rem-all-tests)
+
+(deftest lml.0
+  (with-output-to-string (s)
+    (let ((*html-output* s))
+      (div)))
+  "<div></div>")
+
+(deftest lml.1
+  (with-output-to-string (s)
+    (let ((*html-output* s))
+      (span-c foo "Foo Bar")))
+  "<span class=\"foo\">Foo Bar</span>")
+
+(deftest lml.2
+  (with-output-to-string (s)
+    (let ((*html-output* s))
+      (table-c foo :style "width:80%" "Foo" " Bar" " test")))
+  "<table class=\"foo\" style=\"width:80%\">Foo Bar test</table>")
+
+(deftest lml.3
+  (with-output-to-string (s)
+    (let ((*html-output* s)
+         (a 5.5d0))
+      (p a)))
+  "<p>5.5d0</p>")
+
+(deftest lml.4
+  (with-output-to-string (s)
+    (let ((*html-output* s)
+         (a 0.75))
+      (img "http://localhost/test.png" :width a)))
+  "<img src=\"http://localhost/test.png\" width=\"0.75\" />")
+
+(deftest lml.5
+  (with-output-to-string (s)
+    (let ((*html-output* s))
+      (div "Start"
+          (p "Testing"))))
+  "<div>Start<p>Testing</p></div>")
+
+(deftest lml.6
+  (with-output-to-string (s)
+    (let ((*html-output* s))
+      (div :style "font-weight:bold"
+          "Start"
+          (p-c a_class "Testing"))))
+  "<div style=\"font-weight:bold\">Start<p class=\"a_class\">Testing</p></div>")
+