summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-11-17 23:32:15 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-11-17 23:32:15 +0100
commit78ebb6e306d843bb45c0baad563be37828d32fae (patch)
tree971c4cfcfb91ad45e6295f30be38d4d892b7fce8 /tests
parentce0aeb4a774511bfbd9ea06b056d3c9b63700934 (diff)
downloadmew-78ebb6e306d843bb45c0baad563be37828d32fae.tar.gz
mew-78ebb6e306d843bb45c0baad563be37828d32fae.tar.xz
mew-78ebb6e306d843bb45c0baad563be37828d32fae.zip
add scan/scan-right
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test.mew b/tests/test.mew
index daeffc1..295d293 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -517,4 +517,12 @@
   (test 1 (search #(1 2 3) #(0 1 2 3 4)))
   (test 1 (search '(1 2 3) '(0 1 2 3 4))))
 
+(test-group "scan"
+  (test '(0 -4 -9 -15) (scan (flip -) 0 '(4 5 6)))
+  (test '(42) (scan * 42 '())))
+
+(test-group "scan-right"
+  (test '(5 -1 6 0)    (scan-right - 0 '(4 5 6)))
+  (test '(42) (scan-right * 42 '())))
+
 (test-exit)