diff options
author | Andy Wingo <wingo@pobox.com> | 2008-10-16 14:16:53 +0200 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2008-10-16 14:16:53 +0200 |
commit | ec5cb8259132365f3a5388c9f833727fbfe5d22f (patch) | |
tree | c8bf4ce551ddc1994dec33cd50de288fd0f7eca8 | |
parent | 62f803617ebe694fe1e9badf2a32e68df4496cb7 (diff) | |
download | guile-ec5cb8259132365f3a5388c9f833727fbfe5d22f.tar.gz |
elisp.test: apply to nil-terminated list is UNRESOLVED with compiled boot-9
* test-suite/tests/elisp.test: If running the '(apply foo nil) test
fails with a vm-error, throw UNRESOLVED. This allows the test suite to
pass in the compiled boot-9.scm while still keeping the elisp apply
issue open.
-rw-r--r-- | test-suite/tests/elisp.test | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/test-suite/tests/elisp.test b/test-suite/tests/elisp.test index 28ec05412..06378f885 100644 --- a/test-suite/tests/elisp.test +++ b/test-suite/tests/elisp.test @@ -278,6 +278,19 @@ (write (eval-elisp expr)))))) (string=? calc expected)))) + (define (elisp-pass-if/maybe-error key expr expected) + (pass-if (with-output-to-string (lambda () (write expr))) + (string=? + (catch key + (lambda () + (with-output-to-string + (lambda () (write (eval-elisp expr))))) + (lambda (k . args) + (format (current-error-port) + "warning: caught ~a: ~a\n" k args) + (throw 'unresolved))) + expected))) + (elisp-pass-if '(and #f) "#f") (elisp-pass-if '(and #t) "#t") (elisp-pass-if '(and nil) "#nil") @@ -327,8 +340,14 @@ ;; loading the macro definition of lambda in subr.el. (elisp-pass-if '(function (lambda (x y &optional o &rest r) (list x y o r))) "(lambda (x y &optional o &rest r) (list x y o r))") (elisp-pass-if '(funcall (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 4) "(1 2 3 (4))") - (elisp-pass-if '(apply (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 nil) "(1 2 3 #nil)") + ;; If r4rs.scm is compiled, `apply' will only unroll true scheme + ;; lists. + (elisp-pass-if/maybe-error + 'vm-error + '(apply (lambda (x y &optional o &rest r) (list x y o r)) 1 2 3 nil) + "(1 2 3 #nil)") + (elisp-pass-if '(setq x 3) "3") (elisp-pass-if '(defvar x 4) "x") (elisp-pass-if 'x "3") |