add abort to unknown prompt test
authorAndy Wingo <wingo@pobox.com>
Thu, 11 Mar 2010 21:36:15 +0000 (22:36 +0100)
committerAndy Wingo <wingo@pobox.com>
Thu, 11 Mar 2010 21:36:15 +0000 (22:36 +0100)
* 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.

libguile/control.c
test-suite/tests/control.test

index 78a3256..bb35fdf 100644 (file)
@@ -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);
 
index 9937910..b3ab707 100644 (file)
                    (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)))