From 7f25db2dd1dfbcb22b0a432efd56b522272eeede Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Fri, 30 Sep 2016 10:39:57 +0200 Subject: [PATCH] rename tfalse.nim to tafalse.nim --- tests/osproc/tafalse.nim | 3 +++ tests/osproc/texitcode.nim | 10 +++++----- tests/osproc/tfalse.nim | 2 -- 3 files changed, 8 insertions(+), 7 deletions(-) create mode 100644 tests/osproc/tafalse.nim delete mode 100644 tests/osproc/tfalse.nim diff --git a/tests/osproc/tafalse.nim b/tests/osproc/tafalse.nim new file mode 100644 index 0000000000..24fd4fb2e6 --- /dev/null +++ b/tests/osproc/tafalse.nim @@ -0,0 +1,3 @@ +# 'tafalse.nim' to ensure it is compiled before texitcode.nim +import system +quit(QuitFailure) diff --git a/tests/osproc/texitcode.nim b/tests/osproc/texitcode.nim index df1db8aa3b..1e83658c21 100644 --- a/tests/osproc/texitcode.nim +++ b/tests/osproc/texitcode.nim @@ -4,14 +4,14 @@ discard """ """ import osproc, os -const filename = when defined(Windows): "tfalse.exe" else: "tfalse" +const filename = when defined(Windows): "tafalse.exe" else: "tafalse" +let dir = getCurrentDir() / "tests" / "osproc" +doAssert fileExists(dir / filename) -doAssert fileExists(getCurrentDir() / "tests" / "osproc" / filename) - -var p = startProcess(filename, getCurrentDir() / "tests" / "osproc") +var p = startProcess(filename, dir) doAssert(waitForExit(p) == QuitFailure) -p = startProcess(filename, getCurrentDir() / "tests" / "osproc") +p = startProcess(filename, dir) var running = true while running: running = running(p) diff --git a/tests/osproc/tfalse.nim b/tests/osproc/tfalse.nim deleted file mode 100644 index a2c5e259db..0000000000 --- a/tests/osproc/tfalse.nim +++ /dev/null @@ -1,2 +0,0 @@ -import system -quit(QuitFailure)