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*).
This commit is contained in:
David M. Carr 2012-08-03 01:24:03 -04:00
parent 58e29c9254
commit 66df8cc78c
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ git add gamma
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

View File

@ -53,7 +53,7 @@ echo delta > delta
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