diff options
author | Vindaar <basti90@gmail.com> | 2018-09-17 19:56:42 +0200 |
---|---|---|
committer | Vindaar <basti90@gmail.com> | 2018-09-17 19:56:42 +0200 |
commit | 72a65c43a738b7d99d8e345b169c37b3de96014d (patch) | |
tree | d473e3f056684785368032962ab0b2b76bcf6f61 /tests/stdlib/t8925.nim | |
parent | e9addb3ab2bdcc37581f1c053d9cfa62bf86d1c0 (diff) | |
download | Nim-72a65c43a738b7d99d8e345b169c37b3de96014d.tar.gz |
add test case
Diffstat (limited to 'tests/stdlib/t8925.nim')
-rw-r--r-- | tests/stdlib/t8925.nim | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/stdlib/t8925.nim b/tests/stdlib/t8925.nim new file mode 100644 index 000000000..d3dc1ea86 --- /dev/null +++ b/tests/stdlib/t8925.nim @@ -0,0 +1,16 @@ +discard """ + file: "strscans.nim" + errormsg: "type mismatch between pattern '$i' (position: 1) and HourRange var 'hour'" +""" + +import strscans + +type + HourRange = range[0..23] + +var + hour: HourRange + timeStr: string + +if scanf(timeStr, "$i", hour): + discard |