diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-03-05 07:26:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-05 07:26:39 +0100 |
commit | 8cc3709df0e4f8e4f2aca6ae68b5b4f145787252 (patch) | |
tree | c7fbbae471651cc02514a02f78676168e9415d0b /t | |
parent | Merge branch 'rs/optim-text-wrap' into maint (diff) | |
parent | git-diff: add a test for git diff --quiet -w (diff) | |
download | git-8cc3709df0e4f8e4f2aca6ae68b5b4f145787252.tar.xz git-8cc3709df0e4f8e4f2aca6ae68b5b4f145787252.zip |
Merge branch 'ld/maint-diff-quiet-w' into maint
* ld/maint-diff-quiet-w:
git-diff: add a test for git diff --quiet -w
git diff --quiet -w: check and report the status
Diffstat (limited to 't')
-rwxr-xr-x | t/t4017-diff-retval.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/t/t4017-diff-retval.sh b/t/t4017-diff-retval.sh index 60dd2014d5..0391a5827e 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 |