summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2025-01-17 06:15:31 -0800
committerKaz Kylheku <kaz@kylheku.com>2025-01-17 06:15:31 -0800
commit895c236f70ecc3b0fbb04eab7d1330796e0610e6 (patch)
treef2d1b49ddaf378b5c5136f0e59b2bd08aa171c9e /tests
parent0708c9a12a1bc518046d9882b7d365b6c5626e76 (diff)
downloadtxr-895c236f70ecc3b0fbb04eab7d1330796e0610e6.tar.gz
txr-895c236f70ecc3b0fbb04eab7d1330796e0610e6.tar.bz2
txr-895c236f70ecc3b0fbb04eab7d1330796e0610e6.zip
New macro: lop1.
* autoload.c (op_set_entries): Autoload on lop1 symbol. * stldlib/op.tl (sys:op-expand): Add lop1 case. (sys:opip-expand): Add lop1 to the list of operators that are recgonized and specially treated. (lop1): New macro. * tests/012/op.tl: New tests. * txr.1: Documented.
Diffstat (limited to 'tests')
-rw-r--r--tests/012/op.tl13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/012/op.tl b/tests/012/op.tl
index 34f7ef39..6bda45a0 100644
--- a/tests/012/op.tl
+++ b/tests/012/op.tl
@@ -52,6 +52,19 @@
(fi (lop list @42 @rest)) (42 t)
(fi (lop list @1 @3 @rest @2)) (3 t))
+'(mtest
+ (fi (lop1)) :error
+ (fi (lop1 list)) (0 t)
+ (fi (lop1 list @1)) (1 t)
+ (fi (lop1 list @2)) (2 t)
+ (fi (lop1 list @42)) (42 t)
+ (fi (lop1 list @rest)) (0 t)
+ (fi (lop1 list @1 @rest)) (1 t)
+ (fi (lop1 list @2 @rest)) (2 t)
+ (fi (lop1 list @42 @rest)) (42 t)
+ (fi (lop1 list @1 @3 @rest @2)) (3 t))
+
+
(mtest
[(do quote x) 3] :error
[(do quote @1) 3] :error