This commit is contained in:
parent
a17d996be9
commit
9d488261df
8 changed files with 46 additions and 20 deletions
|
|
@ -3,10 +3,18 @@ import os
|
|||
template getScriptDir(): string =
|
||||
parentDir(instantiationInfo(-1, true).filename)
|
||||
|
||||
const
|
||||
execName = when defined(windows): "tgorge.bat" else: "sh tgorge.sh"
|
||||
relOutput = gorge(execName)
|
||||
absOutput = gorge(getScriptDir() / execName)
|
||||
block gorge:
|
||||
const
|
||||
execName = when defined(windows): "tgorge.bat" else: "./tgorge.sh"
|
||||
relOutput = gorge(execName)
|
||||
absOutput = gorge(getScriptDir() / execName)
|
||||
|
||||
doAssert relOutput == "gorge test"
|
||||
doAssert absOutput == "gorge test"
|
||||
doAssert relOutput == "gorge test"
|
||||
doAssert absOutput == "gorge test"
|
||||
|
||||
block gorgeEx:
|
||||
const
|
||||
execName = when defined(windows): "tgorgeex.bat" else: "./tgorgeex.sh"
|
||||
res = gorgeEx(execName)
|
||||
doAssert res.output == "gorgeex test"
|
||||
doAssert res.exitCode == 1
|
||||
|
|
|
|||
2
tests/vm/tgorgeex.bat
Normal file
2
tests/vm/tgorgeex.bat
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
@echo gorgeex test
|
||||
@exit /b 1
|
||||
3
tests/vm/tgorgeex.sh
Normal file
3
tests/vm/tgorgeex.sh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
echo "gorgeex test"
|
||||
exit 1
|
||||
Loading…
Add table
Add a link
Reference in a new issue