diff options
author | twetzel59 <twetzel59@gmail.com> | 2018-03-04 11:30:28 -0500 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-03-04 17:30:28 +0100 |
commit | 9079517d71a010e38a700870abf0703165e08b8b (patch) | |
tree | 836c2aa88063082ecb8b73bece829b8d6d87b597 /tests/stdlib/tstreams3.nim | |
parent | 4164ec4f8b6d9968e69381edd35d9cf6fe79dee1 (diff) | |
download | Nim-9079517d71a010e38a700870abf0703165e08b8b.tar.gz |
Resolves #5588: adds openFileStream proc that throws on failure (#7282)
Diffstat (limited to 'tests/stdlib/tstreams3.nim')
-rw-r--r-- | tests/stdlib/tstreams3.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/stdlib/tstreams3.nim b/tests/stdlib/tstreams3.nim new file mode 100644 index 000000000..b2c9170e3 --- /dev/null +++ b/tests/stdlib/tstreams3.nim @@ -0,0 +1,10 @@ +discard """ + file: "tstreams3.nim" + output: "threw exception" +""" +import streams + +try: + var fs = openFileStream("shouldneverexist.txt") +except IoError: + echo "threw exception" |