git-diff: add a test for git diff --quiet -w
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Larry D'Anna committed
Feb 21, 2010 at 21:58 UTC
1caaf225f86b7b1818103e72774e191fb1f3d0bb
1 file changed
+15
t/t4017-diff-retval.sh
+15
@@ -5,6 +5,9 @@ test_description='Return value of diffs'
5
. ./test-lib.sh
6
7
test_expect_success 'setup' '
8
+ echo "1 " >a &&
9
+ git add . &&
10
+ git commit -m zeroth &&
11
echo 1 >a &&
12
git add . &&
13
git commit -m first &&
@@ -13,6 +16,18 @@ test_expect_success 'setup' '
16
git commit -a -m second
17
'
18
19
+test_expect_success 'git diff --quiet -w HEAD^^ HEAD^' '
20
+ git diff --quiet -w HEAD^^ HEAD^
21
+'
22
+
23
+test_expect_success 'git diff --quiet HEAD^^ HEAD^' '
24
+ test_must_fail git diff --quiet HEAD^^ HEAD^
25
+'
26
+
27
+test_expect_success 'git diff --quiet -w HEAD^ HEAD' '
28
+ test_must_fail git diff --quiet -w HEAD^ HEAD
29
+'
30
+
31
test_expect_success 'git diff-tree HEAD^ HEAD' '
32
git diff-tree --exit-code HEAD^ HEAD
33
test $? = 1