* [PATCH] git-diff: add a test for git diff --quiet -w
@ 2010-02-22 2:58 Larry D'Anna
2010-02-22 6:03 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Larry D'Anna @ 2010-02-22 2:58 UTC (permalink / raw)
To: git; +Cc: Larry D'Anna
This patch adds two test cases for:
6977c25 git diff --quiet -w: check and report the status
Signed-off-by: Larry D'Anna <larry@elder-gods.org>
---
t/t4017-diff-retval.sh | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh
index 60dd201..14f80ca 100755
--- a/t/t4017-diff-retval.sh
+++ b/t/t4017-diff-retval.sh
@@ -5,6 +5,9 @@ test_description='Return value of diffs'
. ./test-lib.sh
test_expect_success 'setup' '
+ echo "1 " >a &&
+ git add . &&
+ git commit -m zeroth &&
echo 1 >a &&
git add . &&
git commit -m first &&
@@ -13,6 +16,16 @@ test_expect_success 'setup' '
git commit -a -m second
'
+test_expect_success 'git diff --quiet -w HEAD^^ HEAD^' '
+ git diff --quiet -w HEAD^^ HEAD^
+ test $? = 0
+'
+
+test_expect_success 'git diff --quiet -w HEAD^ HEAD' '
+ git diff --quiet -w HEAD^ HEAD
+ test $? = 1
+'
+
test_expect_success 'git diff-tree HEAD^ HEAD' '
git diff-tree --exit-code HEAD^ HEAD
test $? = 1
--
1.7.0.rc2.40.g7d8aa
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] git-diff: add a test for git diff --quiet -w
2010-02-22 2:58 [PATCH] git-diff: add a test for git diff --quiet -w Larry D'Anna
@ 2010-02-22 6:03 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2010-02-22 6:03 UTC (permalink / raw)
To: Larry D'Anna; +Cc: git
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-22 6:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-22 2:58 [PATCH] git-diff: add a test for git diff --quiet -w Larry D'Anna
2010-02-22 6:03 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).