summaryrefslogtreecommitdiffstats
path: root/tests/012/quasi.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2015-07-25 07:25:53 -0700
committerKaz Kylheku <kaz@kylheku.com>2015-07-25 07:25:53 -0700
commit4c1e5751291aca5d4a67088ca9e369fc0ee4c835 (patch)
treee52d0a4fc937eface6173f64ca7062ff0e07b1a7 /tests/012/quasi.tl
parentcf79fc20eb9e8955042660c0b1e124b5b603746c (diff)
downloadtxr-4c1e5751291aca5d4a67088ca9e369fc0ee4c835.tar.gz
txr-4c1e5751291aca5d4a67088ca9e369fc0ee4c835.tar.bz2
txr-4c1e5751291aca5d4a67088ca9e369fc0ee4c835.zip
Quasiliteral tests.
* tests/012/quasi.expected: New file. * tests/012/quasi.tl: New file.
Diffstat (limited to 'tests/012/quasi.tl')
-rw-r--r--tests/012/quasi.tl15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/012/quasi.tl b/tests/012/quasi.tl
new file mode 100644
index 00000000..4c017b62
--- /dev/null
+++ b/tests/012/quasi.tl
@@ -0,0 +1,15 @@
+(load "../common")
+
+(test
+ (mapcar (ap (op (ret `@@@1-@@@rest`))) '((a b) (c d) (e f)))
+ ("a-b" "c-d" "e-f"))
+
+(test
+ (let ((a "abc") (b 123))
+ `@{b 12} @{b -12} @{a [0] 3} @{a [0..2] -5}`)
+ "123 123 a ab")
+
+(test
+ (let ((a "abc") (b 123))
+ [(ret `@1-@2-@@1-@@2-@{@1 -4}-@{@2 -4}`) a b])
+ "abc-123-abc-123- abc- 123")