summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tests/osproc/tafalse.nim3
-rw-r--r--tests/osproc/texitcode.nim10
-rw-r--r--tests/osproc/tfalse.nim2
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/osproc/tafalse.nim b/tests/osproc/tafalse.nim
new file mode 100644
index 000000000..24fd4fb2e
--- /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 df1db8aa3..1e83658c2 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 a2c5e259d..000000000
--- a/tests/osproc/tfalse.nim
+++ /dev/null
@@ -1,2 +0,0 @@
-import system
-quit(QuitFailure)