Patchwork D10300: tests: stablize test-hook.t on Windows

login
register
mail settings
Submitter phabricator
Date April 4, 2021, 3:12 a.m.
Message ID <differential-rev-PHID-DREV-wxpzryh6uwyfodh26eg6-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/48617/
State Superseded
Headers show

Comments

phabricator - April 4, 2021, 3:12 a.m.
mharbison72 created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  Apparently, hooks can't run `echo` directly, even from MSYS.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D10300

AFFECTED FILES
  tests/test-hook.t

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -1407,12 +1407,12 @@ 
 
   $ cat << EOF >> .hg/hgrc
   > [hooks]
-  > pre-version.testing-default=echo '### default ###' plain: \${HGPLAIN:-'<unset>'}
-  > pre-version.testing-yes=echo '### yes #######' plain: \${HGPLAIN:-'<unset>'}
+  > pre-version.testing-default=sh -c "echo '### default ###' plain: \${HGPLAIN:-'<unset>'}"
+  > pre-version.testing-yes=sh -c "echo '### yes #######' plain: \${HGPLAIN:-'<unset>'}"
   > pre-version.testing-yes:run-with-plain=yes
-  > pre-version.testing-no=echo '### no ########' plain: \${HGPLAIN:-'<unset>'}
+  > pre-version.testing-no=sh -c "echo '### no ########' plain: \${HGPLAIN:-'<unset>'}"
   > pre-version.testing-no:run-with-plain=no
-  > pre-version.testing-auto=echo '### auto ######' plain: \${HGPLAIN:-'<unset>'}
+  > pre-version.testing-auto=sh -c "echo '### auto ######' plain: \${HGPLAIN:-'<unset>'}"
   > pre-version.testing-auto:run-with-plain=auto
   > EOF