Show More
@@ -1334,6 +1334,9 b' class TTest(Test):' | |||
|
1334 | 1334 | script.append(b'alias hg="%s"\n' % self._hgcommand) |
|
1335 | 1335 | if os.getenv('MSYSTEM'): |
|
1336 | 1336 | script.append(b'alias pwd="pwd -W"\n') |
|
1337 | if self._case: | |
|
1338 | script.append(b'TESTCASE=%s\n' % shellquote(self._case)) | |
|
1339 | script.append(b'export TESTCASE\n') | |
|
1337 | 1340 | |
|
1338 | 1341 | n = 0 |
|
1339 | 1342 | for n, l in enumerate(lines): |
@@ -1533,6 +1533,26 b' Test cases in .t files' | |||
|
1533 | 1533 | python hash seed: * (glob) |
|
1534 | 1534 | [1] |
|
1535 | 1535 | |
|
1536 | Test TESTCASE variable | |
|
1537 | ||
|
1538 | $ cat > test-cases-ab.t <<'EOF' | |
|
1539 | > $ dostuff() { | |
|
1540 | > > echo "In case $TESTCASE" | |
|
1541 | > > } | |
|
1542 | > #testcases A B | |
|
1543 | > #if A | |
|
1544 | > $ dostuff | |
|
1545 | > In case A | |
|
1546 | > #endif | |
|
1547 | > #if B | |
|
1548 | > $ dostuff | |
|
1549 | > In case B | |
|
1550 | > #endif | |
|
1551 | > EOF | |
|
1552 | $ rt test-cases-ab.t | |
|
1553 | .. | |
|
1554 | # Ran 2 tests, 0 skipped, 0 failed. | |
|
1555 | ||
|
1536 | 1556 |
|
|
1537 | 1557 | |
|
1538 | 1558 | $ cat << EOF >> common-pattern.py |
General Comments 0
You need to be logged in to leave comments.
Login now