[PATCH 06 of 11 STABLE] tests: use "sh -c 'script'" style to evaluate "$HG_ARGS" correctly anywhere

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Mon Oct 20 08:27:00 CDT 2014


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1413810488 -32400
#      Mon Oct 20 22:08:08 2014 +0900
# Branch stable
# Node ID e5555e390871e982270f94cd62bfd771faa97f0b
# Parent  da9791c9eb40fc5f2fdb89b97b487e80dcd1a04d
tests: use "sh -c 'script'" style to evaluate "$HG_ARGS" correctly anywhere

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.

This patch uses "sh -c 'script'" style to evaluate "$HG_ARGS"
expression correctly anywhere.

diff --git a/tests/test-alias.t b/tests/test-alias.t
--- a/tests/test-alias.t
+++ b/tests/test-alias.t
@@ -395,7 +395,7 @@ command provided extension, should be ab
   > [extensions]
   > hgext.rebase =
   > [alias]
-  > rebate = !echo this is \$HG_ARGS
+  > rebate = !bash -c 'echo this is \$HG_ARGS'
   > EOF
   $ hg reba
   hg: command 'reba' is ambiguous:


More information about the Mercurial-devel mailing list