tests: eliminate use of sed -i (which fails on NetBSD)
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Thu, 22 Jan 2009 14:33:49 +0100
changeset 7680 89c2b78faec4
parent 7679 eb98218db768
child 7681 c6f3ff294fe0
tests: eliminate use of sed -i (which fails on NetBSD)
tests/test-diff-change
--- a/tests/test-diff-change	Thu Jan 22 14:32:39 2009 +0100
+++ b/tests/test-diff-change	Thu Jan 22 14:33:49 2009 +0100
@@ -38,11 +38,13 @@
 done
 hg commit -m "lots of text" # 3
 
-sed -i -e 's,^2$,x,' file.txt
+sed -e 's,^2$,x,' file.txt > file.txt.tmp
+mv file.txt.tmp file.txt
 hg commit -m "changed 2 to x" # 4
 
 hg up -r 3 > /dev/null 2>&1 # updated, merged, removed, unresolved
-sed -i -e 's,^8$,y,' file.txt
+sed -e 's,^8$,y,' file.txt > file.txt.tmp
+mv file.txt.tmp file.txt
 hg commit -m "change 8 to y" > /dev/null 2>&1 # 5 # created new head
 
 hg up -C -r 4 > /dev/null 2>&1 # updated, merged, removed, unresolved