diff options
author | Andy Wingo <wingo@pobox.com> | 2010-03-11 22:36:15 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-03-11 22:36:15 +0100 |
commit | 9f0745183605c4f2997b95c421637678ca5e5e2a (patch) | |
tree | ffd109075cf5db93832005f250bb92a65d58cd43 | |
parent | c6a32a2cd59190dcf17c7fb3022588f56079a03e (diff) | |
download | guile-9f0745183605c4f2997b95c421637678ca5e5e2a.tar.gz |
add abort to unknown prompt test
* libguile/control.c (scm_c_abort): Change error string if a prompt
isn't found.
* test-suite/tests/control.test ("abort to unknown prompt"): New test.
-rw-r--r-- | libguile/control.c | 2 | ||||
-rw-r--r-- | test-suite/tests/control.test | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/libguile/control.c b/libguile/control.c index 78a325674..bb35fdf37 100644 --- a/libguile/control.c +++ b/libguile/control.c @@ -207,7 +207,7 @@ scm_c_abort (SCM vm, SCM tag, size_t n, SCM *argv, scm_t_int64 cookie) /* If we didn't find anything, raise an error. */ if (scm_is_false (prompt)) - scm_misc_error ("abort", "abort to unknown tag", scm_list_1 (tag)); + scm_misc_error ("abort", "Abort to unknown prompt", scm_list_1 (tag)); cont = reify_partial_continuation (vm, prompt, winds, cookie); diff --git a/test-suite/tests/control.test b/test-suite/tests/control.test index 99379103b..b3ab707fe 100644 --- a/test-suite/tests/control.test +++ b/test-suite/tests/control.test @@ -221,3 +221,7 @@ (lambda (k x) x)) (lambda (k) k)))) (k)))) + +(with-test-prefix "abort to unknown prompt" + (pass-if-exception "foo" '(misc-error . "^Abort to unknown prompt") + (abort-to-prompt 'does-not-exist))) |