aboutsummaryrefslogtreecommitdiff
path: root/tests/test/util.scm
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-07-16 23:35:50 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-07-16 23:35:50 +0200
commit16e68df7cacf367bffa06ec2ca23ee151b2dfa6c (patch)
treed3c41eba09a01c36e04e1b50601fb45f8c5f7e51 /tests/test/util.scm
parentFix nested #if (diff)
downloadcalp-16e68df7cacf367bffa06ec2ca23ee151b2dfa6c.tar.gz
calp-16e68df7cacf367bffa06ec2ca23ee151b2dfa6c.tar.xz
Add break/all.
Diffstat (limited to 'tests/test/util.scm')
-rw-r--r--tests/test/util.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test/util.scm b/tests/test/util.scm
index aa37d20c..5e2aab4e 100644
--- a/tests/test/util.scm
+++ b/tests/test/util.scm
@@ -206,6 +206,15 @@
'((1 + 2) (* 3 + 4))
(split-by-one-of '(1 + 2 * 3 + 4) '(*))))
+
+(test-group "break/all"
+ (test-equal '((a b c)) (break/all (const #f) '(a b c)))
+ (test-equal '(()) (break/all (const #t) '()))
+ (test-equal '(() () () ()) (break/all (const #t) '(a b c)))
+ (test-equal '((a b) (c d)) (break/all number? '(a b 1 c d)))
+ (test-equal '(() ()) (break/all number? '(1))))
+
+
(call-with-values
(lambda ()
(span-upto