add couple list utils
list-split and list-join
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
(include "basic.scm")
|
||||
(include "semen.scm")
|
||||
(include "utils.scm")
|
||||
|
||||
;;; Should be the last in the test suite
|
||||
(test-exit)
|
||||
|
||||
22
tests/utils.scm
Normal file
22
tests/utils.scm
Normal file
@@ -0,0 +1,22 @@
|
||||
(test-group "utils"
|
||||
|
||||
(test
|
||||
'((1) (2) (3))
|
||||
(list-split '(1 * 2 * 3) '*))
|
||||
|
||||
(test
|
||||
'((1 2 3))
|
||||
(list-split '(1 2 3) '*))
|
||||
|
||||
(test
|
||||
'(() (1) (2) (3) ())
|
||||
(list-split '(* 1 * 2 * 3 *) '*))
|
||||
|
||||
(test
|
||||
'((const) (const struct something))
|
||||
(list-split '(const * const struct something) '*))
|
||||
|
||||
(test
|
||||
'(1 * 2 * 3)
|
||||
(list-join '(1 2 3) '*))
|
||||
)
|
||||
Reference in New Issue
Block a user