updated tests to be executed

This commit is contained in:
Arne Döring
2018-11-14 23:14:16 +01:00
committed by Araq
parent 8ea72bdcea
commit e012eb1001
57 changed files with 341 additions and 90 deletions

View File

@@ -1,3 +1,13 @@
discard """
output: '''
Test
abcxyz123
'''
"""
proc fakeReadLine(): string =
"abcxyz123"
type
TMaybe[T] = object
case empty: bool
@@ -12,7 +22,7 @@ proc Nothing[T](): TMaybe[T] =
result.empty = true
proc safeReadLine(): TMaybe[string] =
var r = stdin.readLine()
var r = fakeReadLine()
if r == "": return Nothing[string]()
else: return Just(r)
@@ -21,3 +31,4 @@ when isMainModule:
echo(Test.value)
var mSomething = safeReadLine()
echo(mSomething.value)
mSomething = safeReadLine()

View File

@@ -1,5 +1,6 @@
discard """
cmd: "nim $target --hints:on --threads:on $options $file"
action: compile
"""
type
@@ -36,4 +37,3 @@ when isMainModule:
echo("test")
joinThread(thr)
os.sleep(3000)