{"thread":{"id":"7515","subject":"[PATCH] Fix t4200-rerere for white-space from \"wc -l\"","startedAt":"2007-04-04T19:39:05Z","lastAt":"2007-04-04T19:39:05Z","messageCount":1,"participants":["Brian Gernhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"38647","messageId":"20070404193905.GA23358@Hermes.local","threadId":"7515","inReplyTo":null,"subject":"[PATCH] Fix t4200-rerere for white-space from \"wc -l\"","fromName":"Brian Gernhardt","fromEmail":"benji@silverinsanity.com","sentAt":"2007-04-04T19:39:05Z","receivedAt":"2007-04-04T19:39:05Z","isPatch":true,"sender":{"key":"benji@silverinsanity.com","avatar":"https://gravatar.com/avatar/e06c101dbc25c68114d859b4a9ec7cf8a2c52fd2b0270ef0eac0e2e63ff22311?d=mp&s=160"},"body":"On OS X, wc outputs 6 spaces before the number of lines, so the test\nexpecting the string \"10\" failed.  Changing the test to use -eq for\nnumerical equality ignores the problematic whitespace.\n\nAlso fix the grammar of the test name while making changes to it.\nThere's only one preimage, so it's \"has\", not \"have\".\n---\n t/t4200-rerere.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t4200-rerere.sh b/t/t4200-rerere.sh\nindex 8b611bb..cd939ac 100755\n--- a/t/t4200-rerere.sh\n+++ b/t/t4200-rerere.sh\n@@ -50,10 +50,10 @@ test_expect_success 'recorded preimage' \"grep ======= $rr/preimage\"\n test_expect_success 'no postimage or thisimage yet' \\\n \t\"test ! -f $rr/postimage -a ! -f $rr/thisimage\"\n \n-test_expect_success 'preimage have right number of lines' '\n+test_expect_success 'preimage has right number of lines' '\n \n \tcnt=$(sed -ne \"/^<<<<<<</,/^>>>>>>>/p\" $rr/preimage | wc -l) &&\n-\ttest \"$cnt\" = 10\n+\ttest \"$cnt\" -eq 10\n \n '\n \n-- \n1.5.1.rc3.30.ga8f4\n"}]}