summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e039011)
raw | patch | inline | side by side (parent: e039011)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Mar 2011 19:22:05 +0000 (12:22 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Mar 2011 19:22:05 +0000 (12:22 -0700) |
Avoid running the command being tested as an upstream of a pipe;
doing so will lose its exit status.
While at it, modernise the style of the script.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
doing so will lose its exit status.
While at it, modernise the style of the script.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t8001-annotate.sh | patch | blob | history |
diff --git a/t/t8001-annotate.sh b/t/t8001-annotate.sh
index 45cb60ea4b167676b07ae1c847c0467f2a5e3d69..41962f04a715ea5250360766dc64986c4ecf7981 100755 (executable)
--- a/t/t8001-annotate.sh
+++ b/t/t8001-annotate.sh
PROG='git annotate'
. "$TEST_DIRECTORY"/annotate-tests.sh
-test_expect_success \
- 'Annotating an old revision works' \
- '[ $(git annotate file master | awk "{print \$3}" | grep -c "^A$") -eq 2 ] && \
- [ $(git annotate file master | awk "{print \$3}" | grep -c "^B$") -eq 2 ]'
-
+test_expect_success 'Annotating an old revision works' '
+ git annotate file master >result &&
+ awk "{ print \$3; }" <result >authors &&
+ test 2 = $(grep A <authors | wc -l) &&
+ test 2 = $(grep B <authors | wc -l)
+'
test_done