It turns out the original regex doesn't support real test cases names like the
one Mercurial is using. Update the regex to being able to precisely select
them on the command line.
Details
- Reviewers
indygreg - Group Reviewers
hg-reviewers - Commits
- rHGf2e3196a34f9: run-tests: follow-up on the test-case format
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
tests/test-run-tests.t | ||
---|---|---|
1669 | Windows can't create the test directory with all of the reserved characters here. Are these necessary? |
test-run-tests.t:1669
+ --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t
+ +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith!@#$%^&*()chars.err
+ @@ -1,3 +1,3 @@Windows can't create the test directory with all of the reserved characters here. Are these necessary?
Maybe no? I think alphanumerics + '-' should be enough, and allowing shell
meta characters is potentially unsafe.
I checked core test files and some extensions test files. Alphanumerics + '-" would works for most of them. Some tests in the hg-experimental repository have a . in their test case name. I would also add _ for allowing all naming cases. Does that sounds good?
@mharbison72 I was not aware that this patch had been merged, is it breaking the windows build right now?
I have sends https://phab.mercurial-scm.org/D3721 to restrict the characters allowed in test-cases, we might want to add a warning or an error when such invalid names are used so the user won't get confused that he cannot select them
Windows can't create the test directory with all of the reserved characters here. Are these necessary?