changeset 27991:5daf1a8c5f1d

tests: avoid nested quoting on command line for portability Before this patch, test-revset.t fails on Solaris using ksh as default "sh", because nested quoting below isn't acceptable for it. +-----------------------------+ inner quoting "`python -c "print '|'.join(['0:1'] * 500)"`" +-------------------------------------------+ outer quoting This patch does below for portability. - omit outer quoting This should be safe, because generated string contains no white space character. - use '+' instead of '|' (for safety) '|' has special meaning for many shell, but '+' isn't (at least, for ordinary ones).
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Fri, 05 Feb 2016 22:32:05 +0900
parents 96bfd2875213
children 8f244b75cc5e
files tests/test-revset.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revset.t	Fri Feb 05 13:20:23 2016 +0100
+++ b/tests/test-revset.t	Fri Feb 05 22:32:05 2016 +0900
@@ -1222,7 +1222,7 @@
 test that chained `or` operations never eat up stack (issue4624)
 (uses `0:1` instead of `0` to avoid future optimization of trivial revisions)
 
-  $ hg log -T '{rev}\n' -r "`python -c "print '|'.join(['0:1'] * 500)"`"
+  $ hg log -T '{rev}\n' -r `python -c "print '+'.join(['0:1'] * 500)"`
   0
   1