mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
add test case
This commit is contained in:
16
tests/stdlib/t8925.nim
Normal file
16
tests/stdlib/t8925.nim
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user