aboutsummaryrefslogtreecommitdiff
path: root/Examples/test-suite/mzscheme/catches_strings_runme.scm
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/mzscheme/catches_strings_runme.scm')
-rw-r--r--Examples/test-suite/mzscheme/catches_strings_runme.scm18
1 files changed, 18 insertions, 0 deletions
diff --git a/Examples/test-suite/mzscheme/catches_strings_runme.scm b/Examples/test-suite/mzscheme/catches_strings_runme.scm
new file mode 100644
index 000000000..745a7cf0a
--- /dev/null
+++ b/Examples/test-suite/mzscheme/catches_strings_runme.scm
@@ -0,0 +1,18 @@
+(load-extension "catches_strings.so")
+(require (lib "defmacro.ss"))
+
+(define exception_thrown "no exception thrown for kin")
+(with-handlers ([exn:fail? (lambda (exn)
+ (set! exception_thrown (exn-message exn)))])
+ (StringsThrower-charstring))
+(unless (string-contains? exception_thrown "charstring message")
+ (error (format "incorrect exception message: ~a" exception_thrown)))
+
+(define exception_thrown "no exception thrown for kin")
+(with-handlers ([exn:fail? (lambda (exn)
+ (set! exception_thrown (exn-message exn)))])
+ (StringsThrower-stdstring))
+(unless (string-contains? exception_thrown "stdstring message")
+ (error (format "incorrect exception message: ~a" exception_thrown)))
+
+(exit 0)