Mercurial > hg-stable
changeset 24838:b2c1ff96c1e1 stable
tests: use double quote to quote arguments in hook for portability
On windows, single quote doesn't work as quote character in hook
command line, because "cmd.exe" doesn't recognize it as quoting
character. And this causes failure of test.
This patch uses double quote to quote arguments in hook instead of
single quote for portability.
Even though single quotes for "[hooks] pretxncommit" in
test-clone-pull-corruption.t seems to work correctly (may MinGW sh
treat specially ?) AFAIK, this patch also replaces them by double
quotes for consistency.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 23 Apr 2015 22:39:21 +0900 |
parents | edf907bd8144 |
children | 6e38b6fc4123 |
files | tests/test-clone-pull-corruption.t tests/test-pending.t |
diffstat | 2 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-clone-pull-corruption.t Wed Apr 22 13:56:30 2015 -0700 +++ b/tests/test-clone-pull-corruption.t Thu Apr 23 22:39:21 2015 +0900 @@ -16,7 +16,7 @@ $ cd ../corrupted $ echo "[hooks]" >> .hg/hgrc - $ echo "pretxncommit = sh -c 'sleep 5; exit 1'" >> .hg/hgrc + $ echo 'pretxncommit = sh -c "sleep 5; exit 1"' >> .hg/hgrc start a commit...
--- a/tests/test-pending.t Wed Apr 22 13:56:30 2015 -0700 +++ b/tests/test-pending.t Thu Apr 23 22:39:21 2015 +0900 @@ -120,7 +120,7 @@ $ cat <<EOF > parent/.hg/hgrc > [hooks] > pretxnchangegroup= - > pretxnclose = hg tip -T 'tip: {node|short}\n' + > pretxnclose = hg tip -T "tip: {node|short}\n" > [phases] > publishing=False > EOF