tests: use "%HG_ARGS%" in shell alias on Windows instead of "$HG_ARGS" stable
authorFUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Tue, 28 Oct 2014 00:19:18 +0900
branchstable
changeset 23093 a3fee83dba59
parent 23092 501dc6b1ca78
child 23094 32dbd1294ea7
tests: use "%HG_ARGS%" in shell alias on Windows instead of "$HG_ARGS" Before this patch, a part of "test-alias.t" fails unexpectedly on Windows environment, because "cmd.exe" can't evaluate "$HG_ARGS" expression in shell alias correctly. This patch uses "%HG_ARGS%" in shell alias on Windows instead of "$HG_ARGS" to expand it correctly.
tests/test-alias.t
--- a/tests/test-alias.t	Tue Oct 28 00:19:18 2014 +0900
+++ b/tests/test-alias.t	Tue Oct 28 00:19:18 2014 +0900
@@ -394,9 +394,18 @@
   $ cat >> .hg/hgrc <<EOF
   > [extensions]
   > hgext.rebase =
+  > EOF
+#if windows
+  $ cat >> .hg/hgrc <<EOF
+  > [alias]
+  > rebate = !echo this is %HG_ARGS%
+  > EOF
+#else
+  $ cat >> .hg/hgrc <<EOF
   > [alias]
   > rebate = !echo this is \$HG_ARGS
   > EOF
+#endif
   $ hg reba
   hg: command 'reba' is ambiguous:
       rebase rebate