tests: stablize test-hook.t on Windows
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 03 Apr 2021 20:26:45 -0400
changeset 46868 802ba3c81507
parent 46867 915a60bf3cb6
child 46869 ed286d150aa8
tests: stablize test-hook.t on Windows Apparently, hooks can't run `echo` directly, even from MSYS. Differential Revision: https://phab.mercurial-scm.org/D10300
tests/test-hook.t
--- a/tests/test-hook.t	Sat Apr 03 20:25:37 2021 -0400
+++ b/tests/test-hook.t	Sat Apr 03 20:26:45 2021 -0400
@@ -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