diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-03-22 01:36:19 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-22 21:48:41 +0300 |
commit | 271cb303a507c8e37fa894c36569c18c6d134510 (patch) | |
tree | b1c4ae6cb905e3b3cc1491ecd245caf2032c97ad /t | |
parent | a5828ae6b52137b913b978e16cd2334482eb4c1f (diff) |
diff --no-index tests: add test for --exit-code
Add a test for --exit-code working with --no-index. There's no reason
to suppose it wouldn't, but we weren't testing for it anywhere in our
tests. Let's fix that blind spot.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-x | t/t4053-diff-no-index.sh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh index 0168946b63..44b932fbb2 100755 --- a/t/t4053-diff-no-index.sh +++ b/t/t4053-diff-no-index.sh @@ -16,6 +16,11 @@ test_expect_success 'setup' ' echo 1 >non/git/b ' +test_expect_success 'git diff --no-index --exit-code' ' + git diff --no-index --exit-code a/1 non/git/a && + test_expect_code 1 git diff --no-index --exit-code a/1 a/2 +' + test_expect_success 'git diff --no-index directories' ' test_expect_code 1 git diff --no-index a b >cnt && test_line_count = 14 cnt |