diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 00:55:35 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-09-05 00:55:35 +0200 |
commit | c64a4bc56f93c08cf55fb907078e588ad737684c (patch) | |
tree | f70767074a4550a2be180dd4659e2dedc922b0b4 /tests/run-tests.scm | |
parent | Move lens test. (diff) | |
download | calp-c64a4bc56f93c08cf55fb907078e588ad737684c.tar.gz calp-c64a4bc56f93c08cf55fb907078e588ad737684c.tar.xz |
Major work on, something.
Diffstat (limited to '')
-rwxr-xr-x | tests/run-tests.scm | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/tests/run-tests.scm b/tests/run-tests.scm index d3ba53f8..6c6ff95a 100755 --- a/tests/run-tests.scm +++ b/tests/run-tests.scm @@ -74,7 +74,8 @@ fi '((skip (value #t)) (only (value #t)) (verbose (single-char #\v)) - (coverage (value optional)))) + (coverage (value optional)) + (catch))) (define options (getopt-long (command-line) option-spec)) @@ -112,17 +113,22 @@ fi ;;; Catch/print-trace should intercept thrown exceptions, print them prettily with a stack trace, and then continue -#; -(define (catch/print-trace proc) - (catch #t proc - (case-lambda - ((err from msg args data) - (test-assert (format #f "~a in ~a: ~?" err from msg args) - #f)) - (args - (test-assert (format #f "~a (~s)" f args) - #f))))) + +(define catch/print-trace + (if (option-ref options 'catch #f) + (lambda (proc) + (catch #t proc + (case-lambda + ((err from msg args data) + (test-assert (format #f "~a in ~a: ~?" err from msg args) + #f)) + (args + (test-assert (format #f "~a (~s)" f args) + #f))))) + (lambda (proc) (proc)))) + +#; (define (catch/print-trace proc) (proc)) |