Patchwork [2,of,3,STABLE,V2] tests: use "%HG_ARGS%" in shell alias on Windows instead of "$HG_ARGS"

login
register
mail settings
Submitter Katsunori FUJIWARA
Date Oct. 27, 2014, 3:25 p.m.
Message ID <4a6e4566659faf66f24a.1414423541@juju>
Download mbox | patch
Permalink /patch/6470/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - Oct. 27, 2014, 3:25 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
# Date 1414423158 -32400
#      Tue Oct 28 00:19:18 2014 +0900
# Branch stable
# Node ID 4a6e4566659faf66f24a4ca386e587ed5a32ef1c
# Parent  14cff7b55734a90f9c55a86f5522f1905f46c281
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.

Patch

diff --git a/tests/test-alias.t b/tests/test-alias.t
--- a/tests/test-alias.t
+++ b/tests/test-alias.t
@@ -394,9 +394,18 @@  command provided extension, should be ab
   $ 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