changeset 11065:76d6c19aa8ef

keyword: cleanup test and make it portable - replace sed call with python command - no need to back up hgrc before record
author Christian Ebert <blacktrash@gmx.net>
date Sat, 01 May 2010 20:49:40 +0200
parents 590b1d6ef50b
children 132d783d6a87
files tests/test-keyword
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-keyword	Fri Apr 30 15:05:51 2010 +0200
+++ b/tests/test-keyword	Sat May 01 20:49:40 2010 +0200
@@ -143,10 +143,8 @@
 cat a c
 
 echo % record
-cp "$HGRCPATH" $HGRCPATH.bak
-sed -e '1 a \foo' a > a.tmp
-mv a.tmp a
-echo bar >> a
+python -c \
+'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
 hg record -d '1 10' -m rectest<<EOF
 y
 y