tests/test-merge-tools.t
changeset 16967 30cfa286947c
parent 16961 cdbb53a640c1
child 16972 5efe9c6a34fe
--- a/tests/test-merge-tools.t	Thu Jun 14 12:54:54 2012 +0200
+++ b/tests/test-merge-tools.t	Fri Jun 15 17:32:33 2012 +0200
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" system-sh || exit 80
-
 test merge-tools configuration - mostly exercising filemerge.py
 
   $ unset HGMERGE # make sure HGMERGE doesn't interfere with the test
@@ -281,18 +279,16 @@
 
 environment variables in true.executable are handled:
 
-  $ cat > $HGTMP/merge.sh <<EOF
-  > #!/bin/sh
-  > echo 'custom merge tool'
-  > EOF
-  $ chmod +x $HGTMP/merge.sh
+  $ echo 'echo "custom merge tool"' > "$HGTMP/merge.sh"
   $ beforemerge
   [merge-tools]
   false.whatever=
   true.priority=1
   true.executable=cat
   # hg update -C 1
-  $ hg merge -r 2 --config merge-tools.true.executable=$HGTMP/merge.sh
+  $ hg --config merge-tools.true.executable='sh' \
+  >    --config merge-tools.true.args="$HGTMP/merge.sh" \
+  >    merge -r 2
   merging f
   custom merge tool
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
@@ -753,11 +749,11 @@
   true.executable=cat
   # hg update -C 1
   $ cat <<EOF > 'my merge tool'
-  > #!/bin/sh
   > cat "\$1" "\$2" "\$3" > "\$4"
   > EOF
-  $ chmod +x 'my merge tool'
-  $ hg merge -r 2 --config merge-tools.true.executable='./my merge tool' --config merge-tools.true.args='$base $local $other $output'
+  $ hg --config merge-tools.true.executable='sh' \
+  >    --config merge-tools.true.args='"./my merge tool" $base $local $other $output' \
+  >    merge -r 2
   merging f
   0 files updated, 1 files merged, 0 files removed, 0 files unresolved
   (branch merge, don't forget to commit)