summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-09-10 00:08:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-09-10 00:08:36 -0700
commitb23424f8d0b093b3438e9c6a2665a543decd7355 (patch)
tree4cddca123726e7182aecdde254198fd0cd8128f8 /tests
parent7f471fde70ef66c3e9bcbe4d96885e9455722da1 (diff)
downloadtxr-b23424f8d0b093b3438e9c6a2665a543decd7355.tar.gz
txr-b23424f8d0b093b3438e9c6a2665a543decd7355.tar.bz2
txr-b23424f8d0b093b3438e9c6a2665a543decd7355.zip
tests: add tests for list-builder and fix bug.
* share/txr/stdlib/build.tl (list-buider pend*): Fix typo: apply should be append. Funny, this didn't propagate to ncon*. * tests/012/seq.tl: Some list-builder tests via build macro.
Diffstat (limited to 'tests')
-rw-r--r--tests/012/seq.tl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/012/seq.tl b/tests/012/seq.tl
index 66361cfb..9c3821d1 100644
--- a/tests/012/seq.tl
+++ b/tests/012/seq.tl
@@ -7,3 +7,13 @@
(test (append '(1) 2) (1 . 2))
(test (append '(1 . 2) 2) :error)
(test (append '(1 . #(3 4 5)) "d") (1 . #(3 4 5 #\d)))
+
+(test (build (add 1) (add 2) (pend (get))) (1 2 1 2))
+(test (build (add 1) (add 2) (pend* (get))) (1 2 1 2))
+(test (build (add 1) (add 2) (pend (get) (get))) (1 2 1 2 1 2))
+(test (build (add 1) (add 2) (pend* (get) (get))) (1 2 1 2 1 2))
+
+(set *print-circle* t)
+
+(stest (build (add 1) (add 2) (ncon (get))) "#1=(1 2 . #1#)")
+(stest (build (add 1) (add 2) (ncon* (get))) "#1=(1 2 . #1#)")