Skip to content
This repository has been archived by the owner on Jan 13, 2022. It is now read-only.

Properly handle specified test names #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

xymostech
Copy link

Before, the available tests were just checked against the passed in comma-separated string of test names, and if the test name was found somewhere in that string it would be run. This caused problems when you had two tests like test and bettertest, because if you passed to run bettertest, it runs both bettertest and test as well (since test is a substring of bettertest, and thus it will be found in the passed in string bettertest).

This fixes the problem by splitting the string of test names on commas (it specifies that the list of tests should be comma-separated in the usage). This way, the in below (line 160) checks if the test name is in the list of tests, and doesn't have any weird substring behavior.

I've signed the CLA already. Thanks!

Before, the available tests were just checked against the passed in
comma-separated string of test names, and if they were found in the string they
were run. This causes problems when you have two tests like "test" and
"bettertest", because if you want to run "bettertest", it runs "test" as well.
This fixes the problem by splitting the input on commas (it specifies that the
list of tests should be comma-separated in the usage), so then the `in` test
below checks the right thing.
@ghost ghost added the CLA Signed label Jul 12, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant