diff options
author | Brian Gernhardt <benji@silverinsanity.com> | 2007-07-01 19:48:54 +0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-02 01:47:20 +0400 |
commit | 9a3c6f7ba7c567e277da58a45ac6fa50461297e3 (patch) | |
tree | ed5c342805ca162d9c78c5f3d9de578f65c4b475 /t/t5516-fetch-push.sh | |
parent | 20314271679e169f324c118c69c8d9e0399feec9 (diff) |
Fix t5516-fetch for systems where `wc -l` outputs whitespace.
When wc outputs whitespace, the test "$(command | wc -l)" = 1 is
broken because " 1" != "1". Let the shell eat the whitespace by
using test 1 = $(command | wc -l) instead.
Signed-off-by: Brian Gernhardt <benji@silverinsanity.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5516-fetch-push.sh')
-rwxr-xr-x | t/t5516-fetch-push.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh index 08d58e1c8c..c0fa2ba404 100755 --- a/t/t5516-fetch-push.sh +++ b/t/t5516-fetch-push.sh @@ -226,7 +226,7 @@ test_expect_success 'push with colon-less refspec (3)' ' git branch -f frotz master && git push testrepo frotz && check_push_result $the_commit heads/frotz && - test "$( cd testrepo && git show-ref | wc -l )" = 1 + test 1 = $( cd testrepo && git show-ref | wc -l ) ' test_expect_success 'push with colon-less refspec (4)' ' @@ -239,7 +239,7 @@ test_expect_success 'push with colon-less refspec (4)' ' git tag -f frotz && git push testrepo frotz && check_push_result $the_commit tags/frotz && - test "$( cd testrepo && git show-ref | wc -l )" = 1 + test 1 = $( cd testrepo && git show-ref | wc -l ) ' |