diff --git a/tests/README b/tests/README --- a/tests/README +++ b/tests/README @@ -28,7 +28,8 @@ writing tests: - diff will show the current time - use hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" to strip dates + use hg diff | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" to strip + dates - set -x and pipelines don't generate stable output diff --git a/tests/test-diffdir b/tests/test-diffdir --- a/tests/test-diffdir +++ b/tests/test-diffdir @@ -7,6 +7,6 @@ hg ci -m "a" -d "0 0" echo 123 > b hg add b -hg diff | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" -hg diff -r tip | sed "s/\(\(---\|+++\).*\)\t.*/\1/" +hg diff -r tip | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" diff --git a/tests/test-up-local-change b/tests/test-up-local-change --- a/tests/test-up-local-change +++ b/tests/test-up-local-change @@ -13,7 +13,7 @@ cd ../r2 hg up echo abc > a hg diff > ../d -sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d +sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d cd ../r1 echo b > b @@ -29,5 +29,5 @@ hg --debug up -m hg parents hg -v history hg diff > ../d -sed "s/\(\(---\|+++\).*\)\t.*/\1/" < ../d +sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d