Jim Hague  committed 8085fed

tests: correct quoting of double quotes in here documents used to write hooks

Some shells, e.g. ksh89, will emit \" in a here document as ",
while others will emit \". To be sure of getting \", we specify \\".

This gets test-commit-amend.t and test-largefiles.t working on AIX.

  • Participants
  • Parent commits bacde76
  • Branches stable

Comments (0)

Files changed (2)

File tests/test-commit-amend.t

   $ cat >> $HGRCPATH <<EOF
   > [hooks]
-  > = sh -c "echo \"pretxncommit \$HG_NODE\"; hg id -r \$HG_NODE"
+  > = sh -c "echo \\"pretxncommit \$HG_NODE\\"; hg id -r \$HG_NODE"
   > EOF
 Amending changeset with changes in working dir:

File tests/test-largefiles.t

   > patterns=glob:**.dat
   > usercache=${USERCACHE}
   > [hooks]
-  > precommit=sh -c "echo \"Invoking status precommit hook\"; hg status"
+  > precommit=sh -c "echo \\"Invoking status precommit hook\\"; hg status"
   > EOF
 Create the repo with a couple of revisions of both large and normal
   $ cd ../addrm
   $ cat >> .hg/hgrc <<EOF
   > [hooks]
-  > post-commit.stat=sh -c "echo \"Invoking status postcommit hook\"; hg status -A"
+  > post-commit.stat=sh -c "echo \\"Invoking status postcommit hook\\"; hg status -A"
   > EOF
   $ touch foo
   $ hg add --large foo