diff options
author | Matt Haggard <haggardii@gmail.com> | 2020-12-18 04:06:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 10:06:13 +0100 |
commit | 23d23ecb081be6702d74024be8f96d92d9f88a59 (patch) | |
tree | 9e8d6dff07ff798f04106882c99aa871319bddce /tests | |
parent | df17cf5e9e1afae333d9ab755d19d1c9d4d60a0f (diff) | |
download | Nim-23d23ecb081be6702d74024be8f96d92d9f88a59.tar.gz |
Make 'echo' raise IOErrors when appropriate (#16367)
* Make 'echo' raise IOError when fwrite/fflush fail * Fix fwrite return value comparison * Add test for echo raising error and don't fail to release locks in echo * Fix exitcode expectation * Make 'echo' raise IOError on Windows if it fails * Add nimLegacyEchoNoRaise for prior no-IOError echo behavior * Use checkErrMaybe template
Diffstat (limited to 'tests')
-rw-r--r-- | tests/exception/t16366.nim | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/exception/t16366.nim b/tests/exception/t16366.nim new file mode 100644 index 000000000..4bcad79ed --- /dev/null +++ b/tests/exception/t16366.nim @@ -0,0 +1,11 @@ +discard """ + action: run + exitcode: 0 + targets: "c cpp" + disabled: openbsd +""" + +echo "foo1" +close stdout +doAssertRaises(IOError): + echo "foo" |