diff tests/test-rollback.t @ 16901:5b89700cce30

tests: consistently use a HGEDITOR pattern that works with msys on windows Removing the need for an executable sh script that can be run from a native windows application enables some tests for running on windows.
author Mads Kiilerich <mads@kiilerich.com>
date Sun, 10 Jun 2012 14:41:14 +0200
parents fc8c7a5ccc4a
children f2719b387380
line wrap: on
line diff
--- a/tests/test-rollback.t	Sun Jun 10 14:14:52 2012 +0200
+++ b/tests/test-rollback.t	Sun Jun 10 14:41:14 2012 +0200
@@ -110,12 +110,10 @@
 
 same thing, but run $EDITOR
 
-  $ cat > editor << '__EOF__'
-  > #!/bin/sh
+  $ cat > editor.sh << '__EOF__'
   > echo "another precious commit message" > "$1"
   > __EOF__
-  $ chmod +x editor
-  $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
+  $ HGEDITOR="\"sh\" \"`pwd`/editor.sh\"" hg --config hooks.pretxncommit=false commit 2>&1
   transaction abort!
   rollback completed
   note: commit message saved in .hg/last-message.txt