Comments
Patch
@@ -1533,6 +1533,26 @@
python hash seed: * (glob)
[1]
+Test TESTCASE variable
+
+ $ cat > test-cases-ab.t <<'EOF'
+ > $ dostuff() {
+ > > echo "In case $TESTCASE"
+ > > }
+ > #testcases A B
+ > #if A
+ > $ dostuff
+ > In case A
+ > #endif
+ > #if B
+ > $ dostuff
+ > In case B
+ > #endif
+ > EOF
+ $ rt test-cases-ab.t
+ ..
+ # Ran 2 tests, 0 skipped, 0 failed.
+
Test automatic pattern replacement
$ cat << EOF >> common-pattern.py
@@ -1334,6 +1334,8 @@
script.append(b'alias hg="%s"\n' % self._hgcommand)
if os.getenv('MSYSTEM'):
script.append(b'alias pwd="pwd -W"\n')
+ if self._case:
+ script.append(b'TESTCASE=%s\n' % shellquote(self._case))
n = 0
for n, l in enumerate(lines):