tests/test-record.t
changeset 16332 42e95631887d
parent 16328 d388c3fc8319
child 16338 118eb4575ea2
--- a/tests/test-record.t	Sat Mar 31 15:39:44 2012 -0500
+++ b/tests/test-record.t	Sun Apr 01 13:59:11 2012 -0500
@@ -919,7 +919,8 @@
 
   $ cat > editor << '__EOF__'
   > #!/bin/sh
-  > sed -i.bak -e 7d -e '5s/^-/ /' "$1"
+  > sed -e 7d -e '5s/^-/ /' "$1" > tmp
+  > mv tmp "$1"
   > __EOF__
   $ chmod +x editor
   $ cat > editedfile << '__EOF__'
@@ -980,7 +981,8 @@
   $ echo "This line has been added" >> editedfile
   $ cat > editor << '__EOF__'
   > #!/bin/sh
-  > sed -i -e 's/^[-+]/ /' "$1"
+  > sed -e 's/^[-+]/ /' "$1" > tmp
+  > mv tmp "$1"
   > __EOF__
   $ chmod +x editor
   $ HGEDITOR="'`pwd`'"/editor hg record <<EOF
@@ -1011,11 +1013,13 @@
 
 Invalid patch
 
-  $ sed -i -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile
+  $ sed -e '3s/third/second/' -e '2s/will/will not/' -e 1d editedfile > tmp
+  $ mv tmp editedfile
   $ echo "This line has been added" >> editedfile
   $ cat > editor << '__EOF__'
   > #!/bin/sh
-  > sed -i s/This/That/ "$1"
+  > sed s/This/That/ "$1" > tmp
+  > mv tmp "$1"
   > __EOF__
   $ chmod +x editor
   $ HGEDITOR="'`pwd`'"/editor hg record <<EOF