summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2022-12-01 18:58:39 +0100
committerLeah Neukirchen <leah@vuxu.org>2022-12-01 22:56:35 +0100
commit34b44c8c44ef78563a38ef931cc78f8934f7e291 (patch)
treeabca15d71d08ea2c81fbc2f2d84cec64bd363fa5 /tests
parent9816d6cea8603026458251f22b147df73b106bd8 (diff)
downloadmew-34b44c8c44ef78563a38ef931cc78f8934f7e291.tar.gz
mew-34b44c8c44ef78563a38ef931cc78f8934f7e291.tar.xz
mew-34b44c8c44ef78563a38ef931cc78f8934f7e291.zip
add gsplit-on
Diffstat (limited to 'tests')
-rw-r--r--tests/test.mew10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/test.mew b/tests/test.mew
index e674481..ff9685e 100644
--- a/tests/test.mew
+++ b/tests/test.mew
@@ -372,7 +372,14 @@
 
 ; gwindow
 
-; gslice-when
+(test-group "gsplit-on"
+  (test '((1) (1) (3 7)) (into '() (gsplit-on even? (generator 1 2 1 2 3 7 0)))))
+
+(test-group "gslice-when"
+  (test '((1 2) (1 2 3) (0 7)) (into '() (gslice-when > (generator 1 2 1 2 3 0 7))))
+  (test '() (into '() (gslice-when (op #t) (generator))))
+  (test '((0)) (into '() (gslice-when (op #t) (generator 0))))
+  (test '((0) (1)) (into '() (gslice-when (op #t) (generator 0 1)))))
 
 ; genumerate
 
@@ -380,7 +387,6 @@
 
 ; gfix
 
-; final
 (test-group "final"
   (test 3 (final (generator 1 2 3)))
   (test #t (void? (final (generator)))))