Mercurial > public > mercurial-scm > hg
diff tests/test-record.t @ 16332:42e95631887d
tests: remove sed -i from test-record
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 01 Apr 2012 13:59:11 -0500 |
parents | d388c3fc8319 |
children | 118eb4575ea2 |
line wrap: on
line diff
--- 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