##// END OF EJS Templates
run-tests: also catch double-escapes for $TESTTMP...
Raphaël Gomès -
r48371:e9c5c368 default
parent child Browse files
Show More
@@ -1308,6 +1308,11 b' class Test(unittest.TestCase):'
1308 (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'),
1308 (br'\bHG_TXNID=TXN:[a-f0-9]{40}\b', br'HG_TXNID=TXN:$ID$'),
1309 ]
1309 ]
1310 r.append((self._escapepath(self._testtmp), b'$TESTTMP'))
1310 r.append((self._escapepath(self._testtmp), b'$TESTTMP'))
1311 if os.name == 'nt':
1312 # JSON output escapes backslashes in Windows paths, so also catch a
1313 # double-escape.
1314 replaced = self._testtmp.replace(b'\\', br'\\')
1315 r.append((self._escapepath(replaced), b'$STR_REPR_TESTTMP'))
1311
1316
1312 replacementfile = os.path.join(self._testdir, b'common-pattern.py')
1317 replacementfile = os.path.join(self._testdir, b'common-pattern.py')
1313
1318
@@ -98,9 +98,15 b' log template:'
98 expand: $TESTTMP/a/$SOMETHING/bar
98 expand: $TESTTMP/a/$SOMETHING/bar
99 $ hg log -rnull -T '{get(peerurls, "dupe")}\n'
99 $ hg log -rnull -T '{get(peerurls, "dupe")}\n'
100 $TESTTMP/b#tip
100 $TESTTMP/b#tip
101 #if windows
102 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
103 [{"pushurl": "https://example.com/dupe", "url": "$STR_REPR_TESTTMP\\b#tip"}]
104 [{"url": "$STR_REPR_TESTTMP\\a\\$SOMETHING\\bar"}]
105 #else
101 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
106 $ hg log -rnull -T '{peerurls % "{urls|json}\n"}'
102 [{"pushurl": "https://example.com/dupe", "url": "$TESTTMP/b#tip"}]
107 [{"pushurl": "https://example.com/dupe", "url": "$TESTTMP/b#tip"}]
103 [{"url": "$TESTTMP/a/$SOMETHING/bar"}]
108 [{"url": "$TESTTMP/a/$SOMETHING/bar"}]
109 #endif
104
110
105 (sub options can be populated by map/dot operation)
111 (sub options can be populated by map/dot operation)
106
112
General Comments 0
You need to be logged in to leave comments. Login now