This commit is contained in:
Andrea Ferretti 2017-02-10 16:53:27 +01:00
commit 83731a9b32
4 changed files with 33 additions and 11 deletions

View file

@ -21,6 +21,11 @@ task cr, "Testing `nimble c -r nimscript.nim` via setCommand":
--r
setCommand "c", "nimscript.nim"
task repeated, "Testing `nimble c nimscript.nim` with repeated flags":
--define: foo
--define: bar
setCommand "c", "nimscript.nim"
task api, "Testing nimscriptapi module functionality":
echo(getPkgDir())

View file

@ -192,6 +192,17 @@ test "can use nimscript's setCommand with flags":
check exitCode == QuitSuccess
check "Hello World".normalize in lines[^2].normalize
test "can use nimscript with repeated flags (issue #329)":
cd "nimscript":
let (output, exitCode) = execNimble("--debug", "repeated")
let lines = output.strip.splitLines()
check exitCode == QuitSuccess
var found = false
for line in lines:
if line.contains("--define:foo"):
found = true
check found == true
test "can list nimscript tasks":
cd "nimscript":
let (output, exitCode) = execNimble("tasks")