summary refs log tree commit diff stats
path: root/tests/exception/t13115.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/exception/t13115.nim')
-rw-r--r--tests/exception/t13115.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/exception/t13115.nim b/tests/exception/t13115.nim
new file mode 100644
index 000000000..9d88bbeda
--- /dev/null
+++ b/tests/exception/t13115.nim
@@ -0,0 +1,13 @@
+discard """
+  exitcode: 1
+  targets: "c"
+  matrix: "-d:debug; -d:release"
+  outputsub: '''t13115.nim(13)           t13115
+Error: unhandled exception: This char is'''
+  outputsub: ''' and works fine! [Exception]'''
+"""
+
+const b_null: char = 0.char
+var msg = "This char is `" & $b_null & "` and works fine!"
+
+raise newException(Exception, msg)
\ No newline at end of file