LuaUnit is a popular unit-testing framework for Lua, with an interface typical of xUnit libraries (Python unittest, Junit, NUnit, ...). It supports several output formats (Text, TAP, JUnit, ...) to be used directly or work with Continuous Integration platforms (Jenkins, Maven, ...).
Other
565
stars
136
forks
source link
Allow passing arguments to runSuiteByInstances #156
This allows passing multiple arguments to runSuiteByInstances explicitly, without parsing command line. If no arguments are passed, it will still parse command line arguments.
It should ease making test runners that accept (different) arguments on the command line themselves and pass them to runSuiteByInstances.
Currently, runSuiteByInstances accepts commandLineArguments as its second parameter, but it allows only for one value to be passed. If you try to give it more values (like '--exclude', 'something') it will error as only first value is passed to function and command line option is missing value. Passing table of arguments doesn't help either, because initFromArguments accepts multiple values and wraps them in additional table which breaks parsing. To pass different arguments than those provided in command line, you have to modify arg table.
This allows passing multiple arguments to
runSuiteByInstances
explicitly, without parsing command line. If no arguments are passed, it will still parse command line arguments.It should ease making test runners that accept (different) arguments on the command line themselves and pass them to
runSuiteByInstances
.Currently,
runSuiteByInstances
acceptscommandLineArguments
as its second parameter, but it allows only for one value to be passed. If you try to give it more values (like '--exclude', 'something') it will error as only first value is passed to function and command line option is missing value. Passing table of arguments doesn't help either, becauseinitFromArguments
accepts multiple values and wraps them in additional table which breaks parsing. To pass different arguments than those provided in command line, you have to modifyarg
table.