Hi-

Here's a puzzle for you.

I want to write a test for the test suite to catch a lexical syntax
error, like the following non-existent named character.  But I need to
somehow introduce another layer of evaluation.  In the following, Guile
would tell me that my test script has an error and then quit, instead of
catching the error and moving on.

(use-modules (test-suite lib))

(define exception:read-error
  (cons 'read-error "^.*"))

(with-test-prefix "basic char handling"
 (pass-if-exception "non-existent named character" 
                    exception:read-error
                    #\foobar))

Thanks,

Mike Gran



Reply via email to