+ Catch and report errors

+ Use scheme-with-scsh
This commit is contained in:
mainzelm 2003-03-14 09:02:05 +00:00
parent e24932011f
commit e62510c4f1
2 changed files with 29 additions and 25 deletions

View File

@ -118,20 +118,29 @@
(if (not silent)
(display-start))
(if (apply proc args)
(begin
(if silent
(display ".")
(call-with-current-continuation
(lambda (k)
(if (with-handler
(lambda (cond more)
(display "Error: ")
(display cond)
(newline)
(k #f))
(lambda ()
(apply proc args)))
(begin
(if silent
(display ".")
(display "OK\n"))
#t)
(begin
(if silent
(begin (newline)
(display-start)))
(display "Error! Input was ")
(display args)
(newline)
#f)))))
#t)
(begin
(if silent
(begin (newline)
(display-start)))
(display "Error! Input was ")
(display args)
(newline)
#f)))))))
;; --- Exported functions to make a test -------------------------------
;; The following 3 functions start the testing. They all have an

View File

@ -8,21 +8,19 @@
test-summary))
(define-structure test-base test-base-interface
(open scsh
scheme
(open scheme-with-scsh
handle
list-lib
define-record-types)
(files test-base))
(define-structure file-system-test (export)
(open scsh
scheme
(open scheme-with-scsh
test-base)
(files file-system-tests))
(define-structure process-state-test (export)
(open scsh
scheme
(open scheme-with-scsh
test-base)
(files process-state-tests))
@ -41,8 +39,7 @@
exec-path-list-test
add-before-test
add-after-test)
(open scsh
scheme
(open scheme-with-scsh
thread-fluids
list-lib
string-lib)
@ -50,15 +47,13 @@
(define-structure add-env-test
(export)
(open scsh
scheme
(open scheme-with-scsh
test-base
env-test)
(files env-test-add))
(define-structure system-parameter-tests (export)
(open scsh
scheme
(open scheme-with-scsh
test-base)
(begin
(add-test! 'uname 'system-parameter