srfi: 1: add tests for append! (and concatenate!)

This commit is contained in:
Ekaitz Zarraga 2024-01-09 01:04:20 +01:00
parent 7bf376b7fb
commit 70989e0cef

View file

@ -77,6 +77,10 @@
(test 'a (append '() 'a)) (test 'a (append '() 'a))
(test '(x y) (append '(x y))) (test '(x y) (append '(x y)))
(test '() (append)) (test '() (append))
(test (list 'a) (append! '() (list 'a)))
(test (list 'a 'b) (append! (list 'a) '() '() (list 'b)))
(test (list 'x 'y) (append! (list 'x 'y)))
(test '() (append!))
(test '(c b a) (reverse '(a b c))) (test '(c b a) (reverse '(a b c)))
(test '((e (f)) d (b c) a) (reverse '(a (b c) d (e (f))))) (test '((e (f)) d (b c) a) (reverse '(a (b c) d (e (f)))))
(test '((one 1 odd) (two 2 even) (three 3 odd)) (zip '(one two three) '(1 2 3) '(odd even odd even odd even odd even))) (test '((one 1 odd) (two 2 even) (three 3 odd)) (zip '(one two three) '(1 2 3) '(odd even odd even odd even odd even)))