X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4020-diff-external.sh;h=2a72e751e290ad59d5277695a1128aebb678c2a1;hb=3f3e2c26fa0325f4df952363f8f5046ca8158bb3;hp=f853b8a894246f1f9d09c18656e290a2e2f9ce6d;hpb=150115aded2e1e0a83db7366f59e4b5bf1aa8135;p=git.git diff --git a/t/t4020-diff-external.sh b/t/t4020-diff-external.sh index f853b8a89..2a72e751e 100755 --- a/t/t4020-diff-external.sh +++ b/t/t4020-diff-external.sh @@ -43,6 +43,13 @@ test_expect_success 'GIT_EXTERNAL_DIFF environment should apply only to diff' ' ' +test_expect_success 'GIT_EXTERNAL_DIFF environment and --no-ext-diff' ' + + GIT_EXTERNAL_DIFF=echo git diff --no-ext-diff | + grep "^diff --git a/file b/file" + +' + test_expect_success 'diff attribute' ' git config diff.parrot.command echo && @@ -68,6 +75,13 @@ test_expect_success 'diff attribute should apply only to diff' ' ' +test_expect_success 'diff attribute and --no-ext-diff' ' + + git diff --no-ext-diff | + grep "^diff --git a/file b/file" + +' + test_expect_success 'diff attribute' ' git config --unset diff.parrot.command && @@ -94,6 +108,13 @@ test_expect_success 'diff attribute should apply only to diff' ' ' +test_expect_success 'diff attribute and --no-ext-diff' ' + + git diff --no-ext-diff | + grep "^diff --git a/file b/file" + +' + test_expect_success 'no diff with -diff' ' echo >.gitattributes "file -diff" && git diff | grep Binary @@ -104,7 +125,7 @@ echo NULZbetweenZwords | perl -pe 'y/Z/\000/' > file test_expect_success 'force diff with "diff"' ' echo >.gitattributes "file diff" && git diff >actual && - test_cmp ../t4020/diff.NUL actual + test_cmp "$TEST_DIRECTORY"/t4020/diff.NUL actual ' test_expect_success 'diff --cached' '