mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-09 13:30:26 +02:00
(list-copy): New tests.
This commit is contained in:
parent
a54e06e5cd
commit
b052db6954
1 changed files with 20 additions and 0 deletions
|
@ -313,6 +313,26 @@
|
|||
(pass-if (not (length+ (circular-list 1 2))))
|
||||
(pass-if (not (length+ (circular-list 1 2 3)))))
|
||||
|
||||
;;
|
||||
;; list-copy
|
||||
;;
|
||||
|
||||
(with-test-prefix "list-copy"
|
||||
|
||||
;; improper lists can be copied
|
||||
(pass-if (equal? '() (list-copy '())))
|
||||
(pass-if (equal? '(1 2) (list-copy '(1 2))))
|
||||
(pass-if (equal? '(1 2 3) (list-copy '(1 2 3))))
|
||||
(pass-if (equal? '(1 2 3 4) (list-copy '(1 2 3 4))))
|
||||
(pass-if (equal? '(1 2 3 4 5) (list-copy '(1 2 3 4 5))))
|
||||
|
||||
;; improper lists can be copied
|
||||
(pass-if (equal? 1 (list-copy 1)))
|
||||
(pass-if (equal? '(1 . 2) (list-copy '(1 . 2))))
|
||||
(pass-if (equal? '(1 2 . 3) (list-copy '(1 2 . 3))))
|
||||
(pass-if (equal? '(1 2 3 . 4) (list-copy '(1 2 3 . 4))))
|
||||
(pass-if (equal? '(1 2 3 4 . 5) (list-copy '(1 2 3 4 . 5)))))
|
||||
|
||||
;;
|
||||
;; take
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue