Keep commas in parentheses in test name filters - #852
Open
jadhavgaurav wants to merge 1 commit into
Open
jadhavgaurav wants to merge 1 commit into
jadhavgaurav wants to merge 1 commit into
Conversation
The -f, -n and -x filters split their argument at every comma, so a parameterized test name such as test_first(0,0) was treated as the two alternatives "test_first(0" and "0)". This ran unrelated tests with -f and no tests at all with -n. A comma nested inside parentheses is now part of the name. Plain comma-separated lists behave as before. Fixes ThrowTheSwitch#779 Signed-off-by: Gaurav Jadhav <gaurav.vjadhav01@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
-f,-nand-xfilters split their argument at every comma, sotest_first(0,0)was read as the two alternativestest_first(0and0). With-fthis ran unrelated tests such astest_second(0,0), and with-nit ran none.A comma nested inside parentheses is now part of the name, in both
UnityStringArgumentMatches(where the list is split) andIsStringInBiggerString(where a comma ends a match). Comma-separated lists like-f "a,b"work as before. An unbalanced(keeps the rest of the argument as one name.Tests: five cases in
test_generate_test_runner.rbagainst a newtestRunnerGeneratorParameterizedArgs.c(include, exact match, no match, comma-separated alternatives mixing parameterized and plain names, exclude). All five fail without the change tosrc/unity.c.rake test:scripts,test:unit,test:fixture,test:memory,test:summaryandtest:makepass.test:stylewas not run locally because rubocop and astyle are not installed.Fixes #779