##// END OF EJS Templates
run-tests: update the test case name format...
Boris Feld -
r38462:b865bba5 default
parent child Browse files
Show More
@@ -120,7 +120,7 b' if pygmentspresent:'
120 }
120 }
121
121
122 class TestRunnerLexer(lexer.RegexLexer):
122 class TestRunnerLexer(lexer.RegexLexer):
123 testpattern = r'[\w-]+\.(t|py)( \(case [\w-]+\))?'
123 testpattern = r'[\w-]+\.(t|py)(#[\w-]+)?'
124 tokens = {
124 tokens = {
125 'root': [
125 'root': [
126 (r'^Skipped', token.Generic.Skipped, 'skipped'),
126 (r'^Skipped', token.Generic.Skipped, 'skipped'),
@@ -1247,7 +1247,7 b' class TTest(Test):'
1247 self._allcases = parsettestcases(path)
1247 self._allcases = parsettestcases(path)
1248 super(TTest, self).__init__(path, *args, **kwds)
1248 super(TTest, self).__init__(path, *args, **kwds)
1249 if case:
1249 if case:
1250 self.name = '%s (case %s)' % (self.name, _strpath(case))
1250 self.name = '%s#%s' % (self.name, _strpath(case))
1251 self.errpath = b'%s.%s.err' % (self.errpath[:-4], case)
1251 self.errpath = b'%s.%s.err' % (self.errpath[:-4], case)
1252 self._tmpname += b'-%s' % case
1252 self._tmpname += b'-%s' % case
1253 self._have = {}
1253 self._have = {}
@@ -2646,7 +2646,7 b' class TestRunner(object):'
2646 expanded_args.append(arg)
2646 expanded_args.append(arg)
2647 args = expanded_args
2647 args = expanded_args
2648
2648
2649 testcasepattern = re.compile(r'([\w-]+\.t|py)( \(case ([\w-])+\))')
2649 testcasepattern = re.compile(r'([\w-]+\.t|py)(#([\w-])+)')
2650 tests = []
2650 tests = []
2651 for t in args:
2651 for t in args:
2652 case = None
2652 case = None
@@ -1496,9 +1496,9 b' Test cases in .t files'
1496 $ [ $V = C ]
1496 $ [ $V = C ]
1497 #endif
1497 #endif
1498
1498
1499 ERROR: test-cases-abc.t (case B) output changed
1499 ERROR: test-cases-abc.t#B output changed
1500 !.
1500 !.
1501 Failed test-cases-abc.t (case B): output changed
1501 Failed test-cases-abc.t#B: output changed
1502 # Ran 3 tests, 0 skipped, 1 failed.
1502 # Ran 3 tests, 0 skipped, 1 failed.
1503 python hash seed: * (glob)
1503 python hash seed: * (glob)
1504 [1]
1504 [1]
@@ -1519,9 +1519,9 b' Test cases in .t files'
1519 $ [ $V = C ]
1519 $ [ $V = C ]
1520 #endif
1520 #endif
1521
1521
1522 ERROR: test-cases-abc.t (case B) output changed
1522 ERROR: test-cases-abc.t#B output changed
1523 !.
1523 !.
1524 Failed test-cases-abc.t (case B): output changed
1524 Failed test-cases-abc.t#B: output changed
1525 # Ran 2 tests, 0 skipped, 1 failed.
1525 # Ran 2 tests, 0 skipped, 1 failed.
1526 python hash seed: * (glob)
1526 python hash seed: * (glob)
1527 [1]
1527 [1]
@@ -1544,9 +1544,9 b' Test cases in .t files'
1544 $ [ $V = C ]
1544 $ [ $V = C ]
1545 #endif
1545 #endif
1546
1546
1547 ERROR: test-cases-abc.t (case B) output changed
1547 ERROR: test-cases-abc.t#B output changed
1548 !.
1548 !.
1549 Failed test-cases-abc.t (case B): output changed
1549 Failed test-cases-abc.t#B: output changed
1550 # Ran 2 tests, 0 skipped, 1 failed.
1550 # Ran 2 tests, 0 skipped, 1 failed.
1551 python hash seed: * (glob)
1551 python hash seed: * (glob)
1552 [1]
1552 [1]
@@ -1573,7 +1573,7 b' Test TESTCASE variable'
1573
1573
1574 Support running a specific test case
1574 Support running a specific test case
1575
1575
1576 $ rt "test-cases-abc.t (case B)"
1576 $ rt "test-cases-abc.t#B"
1577
1577
1578 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1578 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1579 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
1579 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1587,16 +1587,16 b' Support running a specific test case'
1587 $ [ $V = C ]
1587 $ [ $V = C ]
1588 #endif
1588 #endif
1589
1589
1590 ERROR: test-cases-abc.t (case B) output changed
1590 ERROR: test-cases-abc.t#B output changed
1591 !
1591 !
1592 Failed test-cases-abc.t (case B): output changed
1592 Failed test-cases-abc.t#B: output changed
1593 # Ran 1 tests, 0 skipped, 1 failed.
1593 # Ran 1 tests, 0 skipped, 1 failed.
1594 python hash seed: * (glob)
1594 python hash seed: * (glob)
1595 [1]
1595 [1]
1596
1596
1597 Support running multiple test cases in the same file
1597 Support running multiple test cases in the same file
1598
1598
1599 $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case C)"
1599 $ rt test-cases-abc.t#B test-cases-abc.t#C
1600
1600
1601 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1601 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1602 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
1602 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1610,16 +1610,16 b' Support running multiple test cases in t'
1610 $ [ $V = C ]
1610 $ [ $V = C ]
1611 #endif
1611 #endif
1612
1612
1613 ERROR: test-cases-abc.t (case B) output changed
1613 ERROR: test-cases-abc.t#B output changed
1614 !.
1614 !.
1615 Failed test-cases-abc.t (case B): output changed
1615 Failed test-cases-abc.t#B: output changed
1616 # Ran 2 tests, 0 skipped, 1 failed.
1616 # Ran 2 tests, 0 skipped, 1 failed.
1617 python hash seed: * (glob)
1617 python hash seed: * (glob)
1618 [1]
1618 [1]
1619
1619
1620 Support running invalid test cases
1620 Support running invalid test cases
1621
1621
1622 $ rt "test-cases-abc.t (case B)" "test-cases-abc.t (case D)"
1622 $ rt test-cases-abc.t#B test-cases-abc.t#D
1623
1623
1624 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1624 --- $TESTTMP/anothertests/cases/test-cases-abc.t
1625 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
1625 +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
@@ -1633,9 +1633,9 b' Support running invalid test cases'
1633 $ [ $V = C ]
1633 $ [ $V = C ]
1634 #endif
1634 #endif
1635
1635
1636 ERROR: test-cases-abc.t (case B) output changed
1636 ERROR: test-cases-abc.t#B output changed
1637 !
1637 !
1638 Failed test-cases-abc.t (case B): output changed
1638 Failed test-cases-abc.t#B: output changed
1639 # Ran 1 tests, 0 skipped, 1 failed.
1639 # Ran 1 tests, 0 skipped, 1 failed.
1640 python hash seed: * (glob)
1640 python hash seed: * (glob)
1641 [1]
1641 [1]
General Comments 0
You need to be logged in to leave comments. Login now