You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some JVM languages (e.g., Kotlin) allow method names to contain spaces. This convention is used in many projects, such as lettuce-core, which is a subject in the APR-Comp. It has a test method that looks like this:
Flacoco will crash on such projects because it won't escape the spaces.
I forgot the exact error because I encountered this bug a few months ago and now I don't have a Kotlin environment at hand, but I still remember what's going on in the code:
Flacoco calls the runOnlineCoveredTestResultPerTestMethods method in test-runner with a list of collected test method names (code).
runOnlineCoveredTestResultPerTestMethods will then concatenate all test method names with a space (code),
... and then transform it into a command-line argument and call runGivenCommandLine(code).
runGivenCommandLine will then spawn a new Java process with the given argument (code).
Therefore, if a test method name contains a space, it will be parsed as two arguments, crashing the command-line parser.
Maybe you can reproduce this issue and forward it to test-runner if necessary. Thanks again for your great project!
The text was updated successfully, but these errors were encountered:
Some JVM languages (e.g., Kotlin) allow method names to contain spaces. This convention is used in many projects, such as lettuce-core, which is a subject in the APR-Comp. It has a test method that looks like this:
Flacoco will crash on such projects because it won't escape the spaces.
I forgot the exact error because I encountered this bug a few months ago and now I don't have a Kotlin environment at hand, but I still remember what's going on in the code:
runOnlineCoveredTestResultPerTestMethods
method in test-runner with a list of collected test method names (code).runOnlineCoveredTestResultPerTestMethods
will then concatenate all test method names with a space (code),runGivenCommandLine
(code).runGivenCommandLine
will then spawn a new Java process with the given argument (code).Therefore, if a test method name contains a space, it will be parsed as two arguments, crashing the command-line parser.
Maybe you can reproduce this issue and forward it to test-runner if necessary. Thanks again for your great project!
The text was updated successfully, but these errors were encountered: