index 02efecae3ad06e5a62553e990fc0934dd0c65eab..d7e327cc5bc5984546032fb085fb581de5755e11 100755 (executable)
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
+if ! test_have_prereq SYMLINKS
+then
+ say 'Symbolic links not supported, skipping tests.'
+ test_done
+fi
+
cat > expected << EOF
diff --git a/frotz b/frotz
new file mode 120000
cat > expected << EOF
diff --git a/frotz b/frotz
new file mode 120000
git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
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
test_done