Patchwork tests: stabilize test-fix.t for Windows

login
register
mail settings
Submitter Matt Harbison
Date April 19, 2018, 2:35 a.m.
Message ID <981ad706524029aaf721.1524105357@Envy>
Download mbox | patch
Permalink /patch/31192/
State Accepted
Headers show

Comments

Matt Harbison - April 19, 2018, 2:35 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1522458729 14400
#      Fri Mar 30 21:12:09 2018 -0400
# Branch stable
# Node ID 981ad706524029aaf72139201c1b6a5deb779cfe
# Parent  afa8126a884b7ad4ba3c34533326a3ea336e6ab2
tests: stabilize test-fix.t for Windows
Yuya Nishihara - April 19, 2018, 11:10 a.m.
On Wed, 18 Apr 2018 22:35:57 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1522458729 14400
> #      Fri Mar 30 21:12:09 2018 -0400
> # Branch stable
> # Node ID 981ad706524029aaf72139201c1b6a5deb779cfe
> # Parent  afa8126a884b7ad4ba3c34533326a3ea336e6ab2
> tests: stabilize test-fix.t for Windows

Queued for stable, thanks.

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -514,8 +514,11 @@  print the filename if it is relevant.
   $ printf "hello\n" > hello.txt
   $ hg add
   adding hello.txt
-  $ hg --config "fix.fail:command=printf 'HELLO\n' ; \
-  >                               printf '{rootpath}: some\nerror' >&2" \
+  $ cat >> $TESTTMP/cmd.sh <<'EOF'
+  > printf 'HELLO\n'
+  > printf "$@: some\nerror" >&2
+  > EOF
+  $ hg --config "fix.fail:command=sh $TESTTMP/cmd.sh {rootpath}" \
   >    --config "fix.fail:fileset=hello.txt" \
   >    fix --working-dir
   [wdir] fail: hello.txt: some