diff options
Diffstat (limited to 't/t4053-diff-no-index.sh')
| -rwxr-xr-x | t/t4053-diff-no-index.sh | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/t/t4053-diff-no-index.sh b/t/t4053-diff-no-index.sh index 5f059f65fc..5e5bad61ca 100755 --- a/t/t4053-diff-no-index.sh +++ b/t/t4053-diff-no-index.sh @@ -2,7 +2,6 @@ test_description='diff --no-index' -TEST_PASSES_SANITIZE_LEAK=true . ./test-lib.sh test_expect_success 'setup' ' @@ -56,7 +55,7 @@ test_expect_success 'git diff --no-index executed outside repo gives correct err export GIT_CEILING_DIRECTORIES && cd non/git && test_must_fail git diff --no-index a 2>actual.err && - test_i18ngrep "usage: git diff --no-index" actual.err + test_grep "usage: git diff --no-index" actual.err ) ' @@ -205,6 +204,18 @@ test_expect_success POSIXPERM,SYMLINKS 'diff --no-index normalizes: mode not lik test_cmp expected actual ' +test_expect_success POSIXPERM 'external diff with mode-only change' ' + echo content >not-executable && + echo content >executable && + chmod +x executable && + echo executable executable $(test_oid zero) 100755 \ + not-executable $(test_oid zero) 100644 not-executable \ + >expect && + test_expect_code 1 git -c diff.external=echo diff \ + --no-index executable not-executable >actual && + test_cmp expect actual +' + test_expect_success "diff --no-index treats '-' as stdin" ' cat >expect <<-EOF && diff --git a/- b/a/1 |
