aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2023-03-16 11:56:31 -0700
committerSean Whitton <spwhitton@spwhitton.name>2023-03-16 19:04:32 -0700
commit8fa41a15f184660ab5bda5f86d645ba9b2582389 (patch)
treeb532dba4b6862c6ab8b47c99f06e8a498422dda7 /tests
parent91c96c933523c1a6a622061682c26a936068b295 (diff)
downloadconsfigurator-8fa41a15f184660ab5bda5f86d645ba9b2582389.tar.gz
support indented heredocs, add new "Reader macros" manual section
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'tests')
-rw-r--r--tests/reader.lisp36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/reader.lisp b/tests/reader.lisp
new file mode 100644
index 0000000..a56c6c0
--- /dev/null
+++ b/tests/reader.lisp
@@ -0,0 +1,36 @@
+(in-package :consfigurator/tests)
+(named-readtables:in-readtable :consfigurator)
+(in-consfig "consfigurator/tests")
+
+(deftest read-heredoc.1
+ #>EOF>yesEOF
+ "yes")
+
+(deftest read-heredoc.2
+ #>>EOF>>yes
+ yesEOF
+ " yes")
+
+(deftest read-heredoc.3
+ #>>EOF>> ; well
+line 1
+EOF
+ "line 1
+")
+
+(deftest read-heredoc.4
+ #>~EOF> blah
+ blah
+ EOF
+ "blah
+blah
+")
+
+(deftest read-heredoc.5
+ #>>~EOF>>
+ line 1
+ line 2
+ EOF
+ "line 1
+line 2
+")