summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorringabout <43030857+ringabout@users.noreply.github.com>2023-01-24 22:37:22 +0800
committerGitHub <noreply@github.com>2023-01-24 15:37:22 +0100
commitd54a7f078d29445bc79ec5f117a2ceb73761b4c4 (patch)
tree6379e900a923f5873eef9f6967f12cabac4957c6 /tests
parent5e7f7109e19b33bc142aa7b06e9044420232a578 (diff)
downloadNim-d54a7f078d29445bc79ec5f117a2ceb73761b4c4.tar.gz
fixes #21261; always checking `nimTestErrorFlag` in the main module (#21288)
* fixes #21261; always checking nimTestErrorFlag in the main module

* add a test
Diffstat (limited to 'tests')
-rw-r--r--tests/exception/m21261.nim1
-rw-r--r--tests/exception/t21261.nim9
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/exception/m21261.nim b/tests/exception/m21261.nim
new file mode 100644
index 000000000..11b12fb5b
--- /dev/null
+++ b/tests/exception/m21261.nim
@@ -0,0 +1 @@
+raise (ref Exception)(msg: "something")
\ No newline at end of file
diff --git a/tests/exception/t21261.nim b/tests/exception/t21261.nim
new file mode 100644
index 000000000..84817d854
--- /dev/null
+++ b/tests/exception/t21261.nim
@@ -0,0 +1,9 @@
+discard """
+  exitcode: 1
+  outputsub: '''
+m21261.nim(1)            m21261
+Error: unhandled exception: something [Exception]
+'''
+"""
+
+import m21261
\ No newline at end of file