unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Need help with catching reader error
@ 2009-04-22 14:32 Mike Gran
  2009-04-22 14:53 ` Andreas Rottmann
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Gran @ 2009-04-22 14:32 UTC (permalink / raw)
  To: Guile Devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-04-22 20:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-22 14:32 Need help with catching reader error Mike Gran
2009-04-22 14:53 ` Andreas Rottmann
2009-04-22 15:40   ` Mike Gran
2009-04-22 20:15   ` Ludovic Courtès

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).