Run can work without additional option if only one bin in .nimble (#761)
* nimble run can work if only one binary in config * usage changed * runFile is option now * usage updated * small refactoring to reduce condition * setRunOptions fix * some code optimisation
This commit is contained in:
parent
e9d45ca683
commit
9391fbc56d
3 changed files with 62 additions and 23 deletions
|
|
@ -950,6 +950,32 @@ suite "nimble run":
|
|||
[$DirSep, "run".changeFileExt(ExeExt)])
|
||||
check output.contains("""Testing `nimble run`: @["--debug", "check"]""")
|
||||
|
||||
test "Parameters not passed to single executable":
|
||||
cd "run":
|
||||
var (output, exitCode) = execNimble(
|
||||
"--debug", # Flag to enable debug verbosity in Nimble
|
||||
"run", # Run command invokation
|
||||
"--debug" # First argument passed to the executed command
|
||||
)
|
||||
check exitCode == QuitSuccess
|
||||
check output.contains("tests$1run$1$2 --debug" %
|
||||
[$DirSep, "run".changeFileExt(ExeExt)])
|
||||
check output.contains("""Testing `nimble run`: @["--debug"]""")
|
||||
|
||||
test "Parameters passed to single executable":
|
||||
cd "run":
|
||||
var (output, exitCode) = execNimble(
|
||||
"--debug", # Flag to enable debug verbosity in Nimble
|
||||
"run", # Run command invokation
|
||||
"--", # Flag to set run file to "" before next argument
|
||||
"--debug", # First argument passed to the executed command
|
||||
"check" # Second argument passed to the executed command.
|
||||
)
|
||||
check exitCode == QuitSuccess
|
||||
check output.contains("tests$1run$1$2 --debug check" %
|
||||
[$DirSep, "run".changeFileExt(ExeExt)])
|
||||
check output.contains("""Testing `nimble run`: @["--debug", "check"]""")
|
||||
|
||||
test "NimbleVersion is defined":
|
||||
cd "nimbleVersionDefine":
|
||||
var (output, exitCode) = execNimble("c", "-r", "src/nimbleVersionDefine.nim")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue