Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

52 lines (44 sloc) 1.409 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)
(:html
(:body
(loop for (link . title) in '(("http://zappa.com/" . "Frank Zappa")
("http://marcusmiller.com/" . "Marcus Miller")
("http://www.milesdavis.com/" . "Miles Davis"))
do (htm (:a :href link
(:b (str title)))
:br))
(:hr)
(: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)
"pink"
"green")
(fmt "~@R" (1+ j)))))))))
(:hr)
(: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)
Jump to Line
Something went wrong with that request. Please try again.