summaryrefslogtreecommitdiff
path: root/test-suite/tests/srfi-1.test
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2003-07-28 23:51:41 +0000
committerKevin Ryde <user42@zip.com.au>2003-07-28 23:51:41 +0000
commit15d36a34384879f927e3de31b4bd74292d1bb86c (patch)
treeba922bbb2d54682da30103243f625a4181ec7ad3 /test-suite/tests/srfi-1.test
parent68eb63f10fbcab0de4e8a339f56c6593ff4c7114 (diff)
downloadguile-15d36a34384879f927e3de31b4bd74292d1bb86c.tar.gz
(length+): New tests.
Diffstat (limited to 'test-suite/tests/srfi-1.test')
-rw-r--r--test-suite/tests/srfi-1.test17
1 files changed, 17 insertions, 0 deletions
diff --git a/test-suite/tests/srfi-1.test b/test-suite/tests/srfi-1.test
index 880010c12..626841ebe 100644
--- a/test-suite/tests/srfi-1.test
+++ b/test-suite/tests/srfi-1.test
@@ -297,6 +297,23 @@
(drop '(a b . c) 2))))
;;
+;; length+
+;;
+
+(with-test-prefix "length+"
+ (pass-if-exception "too few args" exception:wrong-num-args
+ (length+))
+ (pass-if-exception "too many args" exception:wrong-num-args
+ (length+ 123 456))
+ (pass-if (= 0 (length+ '())))
+ (pass-if (= 1 (length+ '(x))))
+ (pass-if (= 2 (length+ '(x y))))
+ (pass-if (= 3 (length+ '(x y z))))
+ (pass-if (not (length+ (circular-list 1))))
+ (pass-if (not (length+ (circular-list 1 2))))
+ (pass-if (not (length+ (circular-list 1 2 3)))))
+
+;;
;; take
;;