1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 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 7061 2003-09-07 06:34:45Z kevin $
;;;;
;;;; 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>")
|