From: Larry D'Anna Date: Mon, 22 Feb 2010 02:58:44 +0000 (-0500) Subject: git-diff: add a test for git diff --quiet -w X-Git-Tag: v1.7.0.2~8^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1caaf225f86b7b1818103e72774e191fb1f3d0bb;p=git.git 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 Signed-off-by: Junio C Hamano --- diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh index 60dd2014d..0391a5827 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,18 @@ 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_expect_success 'git diff --quiet HEAD^^ HEAD^' ' + test_must_fail git diff --quiet HEAD^^ HEAD^ +' + +test_expect_success 'git diff --quiet -w HEAD^ HEAD' ' + test_must_fail git diff --quiet -w HEAD^ HEAD +' + test_expect_success 'git diff-tree HEAD^ HEAD' ' git diff-tree --exit-code HEAD^ HEAD test $? = 1