summaryrefslogtreecommitdiff
path: root/test-suite/tests/eval.test
diff options
context:
space:
mode:
Diffstat (limited to 'test-suite/tests/eval.test')
-rw-r--r--test-suite/tests/eval.test28
1 files changed, 26 insertions, 2 deletions
diff --git a/test-suite/tests/eval.test b/test-suite/tests/eval.test
index 6bca6235c..4adf0312f 100644
--- a/test-suite/tests/eval.test
+++ b/test-suite/tests/eval.test
@@ -99,10 +99,10 @@
))
;;;
-;;; apply
+;;; call
;;;
-(with-test-prefix "application"
+(with-test-prefix "call"
(with-test-prefix "wrong number of arguments"
@@ -143,6 +143,30 @@
((lambda (x y . rest) #f) 1))))
;;;
+;;; apply
+;;;
+
+(with-test-prefix "apply"
+
+ (with-test-prefix "scm_tc7_subr_2o"
+
+ ;; prior to guile 1.6.9 and 1.8.1 this called the function with
+ ;; SCM_UNDEFIEND, which in the case of make-vector resulted in
+ ;; wrong-type-arg, instead of the intended wrong-num-args
+ (pass-if-exception "0 args" exception:wrong-num-args
+ (apply make-vector '()))
+
+ (pass-if "1 arg"
+ (vector? (apply make-vector '(1))))
+
+ (pass-if "2 args"
+ (vector? (apply make-vector '(1 2))))
+
+ ;; prior to guile 1.6.9 and 1.8.1 this error wasn't detected
+ (pass-if-exception "3 args" exception:wrong-num-args
+ (apply make-vector '(1 2 3)))))
+
+;;;
;;; map
;;;