X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft4011-diff-symlink.sh;h=3a8130996739766f8168fe2908814987395d53a2;hb=b0085a716770d9d2876edd74c6119c48d9d6f232;hp=02efecae3ad06e5a62553e990fc0934dd0c65eab;hpb=7a134dbbc9ca7013c09b610351c5ce45dc10cda5;p=git.git diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh index 02efecae3..3a8130996 100755 --- a/t/t4011-diff-symlink.sh +++ b/t/t4011-diff-symlink.sh @@ -9,6 +9,13 @@ test_description='Test diff of symlinks. . ./test-lib.sh . "$TEST_DIRECTORY"/diff-lib.sh +if ! test_have_prereq SYMLINKS +then + say 'Symbolic links not supported, skipping tests.' + test_done + exit +fi + cat > expected << EOF diff --git a/frotz b/frotz new file mode 120000 @@ -82,4 +89,11 @@ test_expect_success \ git diff-index -M -p $tree > current && compare_diff_patch current expected' +test_expect_success \ + 'diff symlinks with non-existing targets' \ + 'ln -s narf pinky && + ln -s take\ over brain && + test_must_fail git diff --no-index pinky brain > output 2> output.err && + grep narf output && + ! grep error output.err' test_done