changeset 469:7f485ed8a463

tests: fix test-merge and test-octopus Both were failing due to extra spaces in the output from merges, which seems to have been caused by a sed expression not working as intended. According to my copy of "man re_format", basic regular expressions (such as used by sed without the -E option) don't support using + as a special character. Thus, I replaced it with one of the recommended alternatives (x+ to xx*).
author David M. Carr <david@carrclan.us>
date Fri, 03 Aug 2012 01:24:03 -0400
parents f7f32bc9107b
children 493b55cb7362
files tests/test-merge tests/test-octopus
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-merge
+++ b/tests/test-merge
@@ -48,7 +48,7 @@
 commit -m 'add gamma'
 
 # clean merge
-git merge beta | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*recursive.*$/Merge successful/' | sed 's/files/file/;s/insertions/insertion/;s/, 0 deletions.*//' | sed 's/| +/| /'
+git merge beta | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*recursive.*$/Merge successful/' | sed 's/files/file/;s/insertions/insertion/;s/, 0 deletions.*//' | sed 's/|  */| /'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-octopus
+++ b/tests/test-octopus
@@ -53,7 +53,7 @@
 git add delta
 commit -m 'add delta'
 
-git merge branch1 branch2 | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*octopus.*$/Merge successful/;s/, 0 deletions.*//'  | sed 's/| +/| /'
+git merge branch1 branch2 | sed "s/the '//;s/' strategy//" | sed 's/^Merge.*octopus.*$/Merge successful/;s/, 0 deletions.*//'  | sed 's/|  */| /'
 
 cd ..
 mkdir gitrepo2