Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
52 lines (44 sloc) 1.38 KB
;;; -*- mode:lisp; package:xl-who.test; -*-
(eval-when (:compile-toplevel :load-toplevel :execute)
(require "xl-who"))
(defpackage :xl-who.test
(:use :lisp :xl-who))
(in-package :xl-who.test)
(defvar *htmlfile*
(merge-pathnames "test.html"
(directory-namestring (ed:get-buffer-file-name))))
(with-open-file (out *htmlfile* :direction :output
:if-exists :supersede
:if-does-not-exist :create
:encoding :binary)
(with-html-output (*standard-output* out :indent t)
(loop for (link . title) in '(("" . "Frank Zappa")
("" . "Marcus Miller")
("" . "Miles Davis"))
do (htm (:a :href link
(:b (str title)))
(:table :border 0 :cellpadding 4
(loop for i below 25 by 5
do (htm
(:tr :align "right"
(loop for j from i below (+ i 5)
do (htm
(:td :bgcolor (if (oddp j)
(fmt "~@R" (1+ j)))))))))
(:h4 "Look at the character entities generated by this example")
(loop for i from 0
for string in '("Fête" "Sørensen" "naïve" "Hühner" "Straße")
do (htm
(:p :style (conc "background-color:" (case (mod i 3)
((0) "red")
((1) "orange")
((2) "blue")))
(htm (esc string)))))))))
(ed:shell-execute *htmlfile* t)