Mercurial > hg-stable
comparison tests/test-run-tests.t @ 38257:f2e3196a34f9
run-tests: follow-up on the test-case format
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.
Differential Revision: https://phab.mercurial-scm.org/D3699
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Thu, 07 Jun 2018 21:09:16 +0200 |
parents | b865bba56db1 |
children | b5651ae53127 |
comparison
equal
deleted
inserted
replaced
38256:688fbb758ba9 | 38257:f2e3196a34f9 |
---|---|
1615 Failed test-cases-abc.t#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 ignoring invalid test cases |
1621 | 1621 |
1622 $ rt test-cases-abc.t#B test-cases-abc.t#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 |
1638 Failed test-cases-abc.t#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] |
1642 | 1642 |
1643 Support running complex test cases names | |
1644 | |
1645 $ cat > test-cases-advanced-cases.t <<'EOF' | |
1646 > #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1647 > $ echo $TESTCASE | |
1648 > simple | |
1649 > EOF | |
1650 | |
1651 $ cat test-cases-advanced-cases.t | |
1652 #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1653 $ echo $TESTCASE | |
1654 simple | |
1655 | |
1656 $ rt test-cases-advanced-cases.t | |
1657 | |
1658 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t | |
1659 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.case-with-dashes.err | |
1660 @@ -1,3 +1,3 @@ | |
1661 #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1662 $ echo $TESTCASE | |
1663 - simple | |
1664 + case-with-dashes | |
1665 | |
1666 ERROR: test-cases-advanced-cases.t#case-with-dashes output changed | |
1667 ! | |
1668 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t | |
1669 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith!@#$%^&*()chars.err | |
1670 @@ -1,3 +1,3 @@ | |
1671 #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1672 $ echo $TESTCASE | |
1673 - simple | |
1674 + casewith!@#$%^&*()chars | |
1675 | |
1676 ERROR: test-cases-advanced-cases.t#casewith!@#$%^&*()chars output changed | |
1677 !. | |
1678 Failed test-cases-advanced-cases.t#case-with-dashes: output changed | |
1679 Failed test-cases-advanced-cases.t#casewith!@#$%^&*()chars: output changed | |
1680 # Ran 3 tests, 0 skipped, 2 failed. | |
1681 python hash seed: * (glob) | |
1682 [1] | |
1683 | |
1684 $ rt "test-cases-advanced-cases.t#case-with-dashes" | |
1685 | |
1686 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t | |
1687 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.case-with-dashes.err | |
1688 @@ -1,3 +1,3 @@ | |
1689 #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1690 $ echo $TESTCASE | |
1691 - simple | |
1692 + case-with-dashes | |
1693 | |
1694 ERROR: test-cases-advanced-cases.t#case-with-dashes output changed | |
1695 ! | |
1696 Failed test-cases-advanced-cases.t#case-with-dashes: output changed | |
1697 # Ran 1 tests, 0 skipped, 1 failed. | |
1698 python hash seed: * (glob) | |
1699 [1] | |
1700 | |
1701 $ rt "test-cases-advanced-cases.t#casewith!@#$%^&*()chars" | |
1702 | |
1703 --- $TESTTMP/anothertests/cases/test-cases-advanced-cases.t | |
1704 +++ $TESTTMP/anothertests/cases/test-cases-advanced-cases.t.casewith!@#$%^&*()chars.err | |
1705 @@ -1,3 +1,3 @@ | |
1706 #testcases simple case-with-dashes casewith!@#$%^&*()chars | |
1707 $ echo $TESTCASE | |
1708 - simple | |
1709 + casewith!@#$%^&*()chars | |
1710 | |
1711 ERROR: test-cases-advanced-cases.t#casewith!@#$%^&*()chars output changed | |
1712 ! | |
1713 Failed test-cases-advanced-cases.t#casewith!@#$%^&*()chars: output changed | |
1714 # Ran 1 tests, 0 skipped, 1 failed. | |
1715 python hash seed: * (glob) | |
1716 [1] | |
1717 | |
1643 Test automatic pattern replacement | 1718 Test automatic pattern replacement |
1644 ================================== | 1719 ================================== |
1645 | 1720 |
1646 $ cat << EOF >> common-pattern.py | 1721 $ cat << EOF >> common-pattern.py |
1647 > substitutions = [ | 1722 > substitutions = [ |