Fixed #329
This commit is contained in:
parent
0a280aa6dd
commit
83731a9b32
4 changed files with 33 additions and 11 deletions
|
|
@ -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())
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue