diff tests/test-run-tests.t @ 38302:b5651ae53127

run-tests: restrict the test cases allowed characters Most test cases in core and in extension only use `A-Za-z0-9-` but a few tests in extensions also have a `.` in their test cases names. Also add a `_` to allow all kind of case naming format. Differential Revision: https://phab.mercurial-scm.org/D3721
author Boris Feld <boris.feld@octobus.net>
date Tue, 12 Jun 2018 23:04:27 +0200
parents f2e3196a34f9
children 3fb46734508d
line wrap: on
line diff
--- a/tests/test-run-tests.t	Sat Jun 09 13:34:47 2018 +0900
+++ b/tests/test-run-tests.t	Tue Jun 12 23:04:27 2018 +0200
@@ -1643,13 +1643,13 @@
 Support running complex test cases names
 
   $ cat > test-cases-advanced-cases.t <<'EOF'
-  > #testcases simple case-with-dashes casewith!@#$%^&*()chars
+  > #testcases simple case-with-dashes casewith_-.chars
   >   $ echo $TESTCASE
   >   simple
   > EOF
 
   $ cat test-cases-advanced-cases.t
-  #testcases simple case-with-dashes casewith!@#$%^&*()chars
+  #testcases simple case-with-dashes casewith_-.chars
     $ echo $TESTCASE
     simple
 
@@ -1658,7 +1658,7 @@
   --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t
   +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.case-with-dashes.err
   @@ -1,3 +1,3 @@
-   #testcases simple case-with-dashes casewith!@#$%^&*()chars
+   #testcases simple case-with-dashes casewith_-.chars
      $ echo $TESTCASE
   -  simple
   +  case-with-dashes
@@ -1666,17 +1666,17 @@
   ERROR: test-cases-advanced-cases.t#case-with-dashes output changed
   !
   --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t
-  +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith!@#$%^&*()chars.err
+  +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith_-.chars.err
   @@ -1,3 +1,3 @@
-   #testcases simple case-with-dashes casewith!@#$%^&*()chars
+   #testcases simple case-with-dashes casewith_-.chars
      $ echo $TESTCASE
   -  simple
-  +  casewith!@#$%^&*()chars
+  +  casewith_-.chars
   
-  ERROR: test-cases-advanced-cases.t#casewith!@#$%^&*()chars output changed
+  ERROR: test-cases-advanced-cases.t#casewith_-.chars output changed
   !.
   Failed test-cases-advanced-cases.t#case-with-dashes: output changed
-  Failed test-cases-advanced-cases.t#casewith!@#$%^&*()chars: output changed
+  Failed test-cases-advanced-cases.t#casewith_-.chars: output changed
   # Ran 3 tests, 0 skipped, 2 failed.
   python hash seed: * (glob)
   [1]
@@ -1686,7 +1686,7 @@
   --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t
   +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.case-with-dashes.err
   @@ -1,3 +1,3 @@
-   #testcases simple case-with-dashes casewith!@#$%^&*()chars
+   #testcases simple case-with-dashes casewith_-.chars
      $ echo $TESTCASE
   -  simple
   +  case-with-dashes
@@ -1698,19 +1698,19 @@
   python hash seed: * (glob)
   [1]
 
-  $ rt "test-cases-advanced-cases.t#casewith!@#$%^&*()chars"
+  $ rt "test-cases-advanced-cases.t#casewith_-.chars"
   
   --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t
-  +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith!@#$%^&*()chars.err
+  +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith_-.chars.err
   @@ -1,3 +1,3 @@
-   #testcases simple case-with-dashes casewith!@#$%^&*()chars
+   #testcases simple case-with-dashes casewith_-.chars
      $ echo $TESTCASE
   -  simple
-  +  casewith!@#$%^&*()chars
+  +  casewith_-.chars
   
-  ERROR: test-cases-advanced-cases.t#casewith!@#$%^&*()chars output changed
+  ERROR: test-cases-advanced-cases.t#casewith_-.chars output changed
   !
-  Failed test-cases-advanced-cases.t#casewith!@#$%^&*()chars: output changed
+  Failed test-cases-advanced-cases.t#casewith_-.chars: output changed
   # Ran 1 tests, 0 skipped, 1 failed.
   python hash seed: * (glob)
   [1]