Files
Nim/tests/exception/t16366.nim
Matt Haggard 23d23ecb08 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
2020-12-18 10:06:13 +01:00

12 lines
147 B
Nim

discard """
action: run
exitcode: 0
targets: "c cpp"
disabled: openbsd
"""
echo "foo1"
close stdout
doAssertRaises(IOError):
echo "foo"