From: Mike Gran <spk121@yahoo.com>
To: Guile Devel <guile-devel@gnu.org>
Subject: Need help with catching reader error
Date: Wed, 22 Apr 2009 07:32:47 -0700 [thread overview]
Message-ID: <1240410767.3133.109.camel@localhost.localdomain> (raw)
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
next reply other threads:[~2009-04-22 14:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-22 14:32 Mike Gran [this message]
2009-04-22 14:53 ` Need help with catching reader error Andreas Rottmann
2009-04-22 15:40 ` Mike Gran
2009-04-22 20:15 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1240410767.3133.109.camel@localhost.localdomain \
--to=spk121@yahoo.com \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).