Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>2010-07-28 14:34:55 +0400
committerJunio C Hamano <gitster@pobox.com>2010-08-18 23:42:45 +0400
commit41be8ea22371b82e2a8eb308386b704c6775ed03 (patch)
tree34178f247c2838cd86db6923c99c7008c5ec1f52 /t/t4011-diff-symlink.sh
parente146d1772b57f595cd7c6537045eedbb82b98e37 (diff)
tests: implicitly skip SYMLINKS tests using <prereq>
Change the tests that skipped due to unavailable SYMLINKS support to use the three-arg prereq form of test_expect_success. Now we get an indication of how many tests that need symlinks are being skipped on platforms that don't support them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4011-diff-symlink.sh')
-rwxr-xr-xt/t4011-diff-symlink.sh18
1 files changed, 6 insertions, 12 deletions
diff --git a/t/t4011-diff-symlink.sh b/t/t4011-diff-symlink.sh
index 918a21a2f4..6f6948925f 100755
--- a/t/t4011-diff-symlink.sh
+++ b/t/t4011-diff-symlink.sh
@@ -9,12 +9,6 @@ test_description='Test diff of symlinks.
. ./test-lib.sh
. "$TEST_DIRECTORY"/diff-lib.sh
-if ! test_have_prereq SYMLINKS
-then
- skip_all='Symbolic links not supported, skipping tests.'
- test_done
-fi
-
cat > expected << EOF
diff --git a/frotz b/frotz
new file mode 120000
@@ -26,7 +20,7 @@ index 0000000..7c465af
\ No newline at end of file
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'diff new symlink' \
'ln -s xyzzy frotz &&
git update-index &&
@@ -35,7 +29,7 @@ test_expect_success \
GIT_DIFF_OPTS=--unified=0 git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
-test_expect_success \
+test_expect_success SYMLINKS \
'diff unchanged symlink' \
'tree=$(git write-tree) &&
git update-index frotz &&
@@ -52,7 +46,7 @@ index 7c465af..0000000
\ No newline at end of file
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'diff removed symlink' \
'mv frotz frotz2 &&
git diff-index -M -p $tree > current &&
@@ -62,7 +56,7 @@ cat > expected << EOF
diff --git a/frotz b/frotz
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'diff identical, but newly created symlink' \
'ln -s xyzzy frotz &&
git diff-index -M -p $tree > current &&
@@ -80,14 +74,14 @@ index 7c465af..df1db54 120000
\ No newline at end of file
EOF
-test_expect_success \
+test_expect_success SYMLINKS \
'diff different symlink' \
'rm frotz &&
ln -s yxyyz frotz &&
git diff-index -M -p $tree > current &&
compare_diff_patch current expected'
-test_expect_success \
+test_expect_success SYMLINKS \
'diff symlinks with non-existing targets' \
'ln -s narf pinky &&
ln -s take\ over brain &&