summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-12-02 07:42:45 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-12-02 07:42:45 -0800
commit9b3459ca129ffe680f8e8c8caeb00167c7180a22 (patch)
treedc823ad21d5bde3b8853cc6c487f7f678f4b0df7 /tests
parent6988511ee608ec35c529ed2ee41ad2f324f4534b (diff)
downloadtxr-9b3459ca129ffe680f8e8c8caeb00167c7180a22.tar.gz
txr-9b3459ca129ffe680f8e8c8caeb00167c7180a22.tar.bz2
txr-9b3459ca129ffe680f8e8c8caeb00167c7180a22.zip
tuples: check length argument.
* lib.c (tuples): Check that n argument giving tuple size is a is a positive integer. * tests/012/seql.tl: Test case added.
Diffstat (limited to 'tests')
-rw-r--r--tests/012/seq.tl3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/012/seq.tl b/tests/012/seq.tl
index d434ad52..d27adcef 100644
--- a/tests/012/seq.tl
+++ b/tests/012/seq.tl
@@ -212,3 +212,6 @@
[separate chr-isalpha "a1b2c3d4"] ("abcd" "1234")
[separate chrp "a1b2c3d4"] ("a1b2c3d4" "")
[separate integerp "a1b2c3d4"] ("" "a1b2c3d4"))
+
+(mtest
+ (tuples 0 '(1 2 3)) :error)