From 1690b8cc5381b8ba89e21cb93b232ba09bff4e66 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 29 May 2023 06:09:18 -0700 Subject: tests: 9 through 14 working. --- test/simple.tl | 179 +++++++++++++++++++++++++++++---------------------------- 1 file changed, 90 insertions(+), 89 deletions(-) diff --git a/test/simple.tl b/test/simple.tl index 18dfbd4..7bd3c61 100644 --- a/test/simple.tl +++ b/test/simple.tl @@ -97,106 +97,107 @@ :br)))) "Frank Zappa
Marcus Miller
Miles Davis
") -(exit) ;;; 9 -(string= (with-html-output-to-string (out nil :prologue t) - (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))) - " -Frank Zappa
Marcus Miller
Miles Davis
") +(test (with-html-output-to-string (out nil :prologue t) + (keep-matches ((@link . @title) '(("http://zappa.com/" . "Frank Zappa") + ("http://marcusmiller.com/" . "Marcus Miller") + ("http://www.milesdavis.com/" . "Miles Davis"))) + (htm (:a :href link + (:b (str title))) + :br))) + "\n \ + Frank Zappa
Marcus Miller
Miles Davis
") ;;; 10 -(string= (with-html-output-to-string - (out nil :prologue "") - (:apply (:factorial) (:cn "3"))) - " -3") +(test (with-html-output-to-string + (out nil :prologue "") + (:apply (:factorial) (:cn "3"))) + "\n \ + 3") ;;; 11 -(string= (let ((*prologue* "")) - (eval `(with-html-output-to-string (out nil :prologue t) - (:apply (:factorial) (:cn "3"))))) - " -3") +(test (let ((*prologue* "")) + (eval ^(with-html-output-to-string (out nil :prologue t) + (:apply (:factorial) (:cn "3"))))) + "\n \ + 3") ;;; 12 -(string= (with-html-output-to-string (out nil :indent t) - (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))) - " - - Frank Zappa - - -
- - Marcus Miller - - -
- - Miles Davis - - -
") +(test (with-html-output-to-string (out nil :indent t) + (keep-matches ((@link . @title) '(("http://zappa.com/" . "Frank Zappa") + ("http://marcusmiller.com/" . "Marcus Miller") + ("http://www.milesdavis.com/" . "Miles Davis"))) + (htm (:a :href link + (:b (str title))) + :br))) + "\n \ + \n \ + \ Frank Zappa\n \ + \ \n \ + \n \ +
\n \ + \n \ + \ Marcus Miller\n \ + \ \n \ + \n \ +
\n \ + \n \ + \ Miles Davis\n \ + \ \n \ + \n \ +
") ;;; 13 -(string= (with-html-output-to-string (out nil :indent 0) - (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))) - " - - Frank Zappa - - -
- - Marcus Miller - - -
- - Miles Davis - - -
") +(test (with-html-output-to-string (out nil :indent 0) + (keep-matches ((@link . @title) '(("http://zappa.com/" . "Frank Zappa") + ("http://marcusmiller.com/" . "Marcus Miller") + ("http://www.milesdavis.com/" . "Miles Davis"))) + (htm (:a :href link + (:b (str title))) + :br))) + "\n \ + \n \ + \ Frank Zappa\n \ + \ \n \ + \n \ +
\n \ + \n \ + \ Marcus Miller\n \ + \ \n \ + \n \ +
\n \ + \n \ + \ Miles Davis\n \ + \ \n \ + \n \ +
") ;;; 14 -(string= (with-html-output-to-string (out nil :indent 3) - (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))) - " - - Frank Zappa - - -
- - Marcus Miller - - -
- - Miles Davis - - -
") +(test (with-html-output-to-string (out nil :indent 3) + (keep-matches ((@link . @title) '(("http://zappa.com/" . "Frank Zappa") + ("http://marcusmiller.com/" . "Marcus Miller") + ("http://www.milesdavis.com/" . "Miles Davis"))) + (htm (:a :href link + (:b (str title))) + :br))) + "\n \ + \ \n \ + \ Frank Zappa\n \ + \ \n \ + \ \n \ + \
\n \ + \ \n \ + \ Marcus Miller\n \ + \ \n \ + \ \n \ + \
\n \ + \ \n \ + \ Miles Davis\n \ + \ \n \ + \ \n \ + \
") + +(exit) ;;; 15 (string= (with-html-output-to-string (out) -- cgit v1.2.3