Skip to content

Commit

Permalink
Fix t4200-rerere for white-space from "wc -l"
Browse files Browse the repository at this point in the history
On OS X, wc outputs 6 spaces before the number of lines, so the test
expecting the string "10" failed.  Do not quote $cmd to strip away
the problematic whitespace as other tests do.

Also fix the grammar of the test name while making changes to it.
There's only one preimage, so it's "has", not "have".

Signed-off-by: Junio C Hamano <junkio@cox.net>
  • Loading branch information
Brian Gernhardt authored and Junio C Hamano committed Apr 4, 2007
1 parent 89815ca commit 364b852
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions t/t4200-rerere.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ test_expect_success 'recorded preimage' "grep ======= $rr/preimage"
test_expect_success 'no postimage or thisimage yet' \
"test ! -f $rr/postimage -a ! -f $rr/thisimage"

test_expect_success 'preimage have right number of lines' '
test_expect_success 'preimage has right number of lines' '
cnt=$(sed -ne "/^<<<<<<</,/^>>>>>>>/p" $rr/preimage | wc -l) &&
test "$cnt" = 10
test $cnt = 10
'

Expand Down

0 comments on commit 364b852

Please sign in to comment.