Files
Nim/tests/osproc/texitcode.nim
2016-09-30 10:39:57 +02:00

19 lines
432 B
Nim

discard """
file: "texitcode.nim"
output: ""
"""
import osproc, os
const filename = when defined(Windows): "tafalse.exe" else: "tafalse"
let dir = getCurrentDir() / "tests" / "osproc"
doAssert fileExists(dir / filename)
var p = startProcess(filename, dir)
doAssert(waitForExit(p) == QuitFailure)
p = startProcess(filename, dir)
var running = true
while running:
running = running(p)
doAssert(waitForExit(p) == QuitFailure)