summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2013-11-25 21:02:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-11-26 22:21:26 (GMT)
commitb018c73526ca9d941c64d6a41d9c24968de38c2b (patch)
treeec19821f24d1c599507a814c82b047789d0c4eb5 /t
parent30a3318ac06c639f0ccb25b3abf627b3120c4dc9 (diff)
downloadgit-b018c73526ca9d941c64d6a41d9c24968de38c2b.zip
git-b018c73526ca9d941c64d6a41d9c24968de38c2b.tar.gz
git-b018c73526ca9d941c64d6a41d9c24968de38c2b.tar.bz2
test: make FILEMODE a lazy prereq
This way, test authors don't need to remember to source lib-prereq-FILEMODE.sh before using the FILEMODE prereq to guard tests that rely on the executable bit being honored when checking out files. Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rw-r--r--t/lib-prereq-FILEMODE.sh11
-rwxr-xr-xt/t3701-add-interactive.sh1
-rwxr-xr-xt/t4102-apply-rename.sh1
-rwxr-xr-xt/t4120-apply-popt.sh1
-rwxr-xr-xt/t4129-apply-samemode.sh1
-rwxr-xr-xt/t6031-merge-recursive.sh1
-rwxr-xr-xt/t9200-git-cvsexportcommit.sh1
-rw-r--r--t/test-lib.sh4
8 files changed, 4 insertions, 17 deletions
diff --git a/t/lib-prereq-FILEMODE.sh b/t/lib-prereq-FILEMODE.sh
deleted file mode 100644
index bce5a4c..0000000
--- a/t/lib-prereq-FILEMODE.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
-#
-
-if test "$(git config --bool core.filemode)" = false
-then
- say 'filemode disabled on the filesystem'
-else
- test_set_prereq FILEMODE
-fi
diff --git a/t/t3701-add-interactive.sh b/t/t3701-add-interactive.sh
index 9dc91d0..24ddd8a 100755
--- a/t/t3701-add-interactive.sh
+++ b/t/t3701-add-interactive.sh
@@ -2,7 +2,6 @@
test_description='add -i basic tests'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL
then
diff --git a/t/t4102-apply-rename.sh b/t/t4102-apply-rename.sh
index e3ea3d5..49e2d6c 100755
--- a/t/t4102-apply-rename.sh
+++ b/t/t4102-apply-rename.sh
@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
# setup
diff --git a/t/t4120-apply-popt.sh b/t/t4120-apply-popt.sh
index c5fecdf..497b628 100755
--- a/t/t4120-apply-popt.sh
+++ b/t/t4120-apply-popt.sh
@@ -6,7 +6,6 @@
test_description='git apply -p handling.'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
mkdir sub &&
diff --git a/t/t4129-apply-samemode.sh b/t/t4129-apply-samemode.sh
index 0d36ebd..c268298 100755
--- a/t/t4129-apply-samemode.sh
+++ b/t/t4129-apply-samemode.sh
@@ -3,7 +3,6 @@
test_description='applying patch with mode bits'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success setup '
echo original >file &&
diff --git a/t/t6031-merge-recursive.sh b/t/t6031-merge-recursive.sh
index 1cd649e..a953f1b 100755
--- a/t/t6031-merge-recursive.sh
+++ b/t/t6031-merge-recursive.sh
@@ -2,7 +2,6 @@
test_description='merge-recursive: handle file mode'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
test_expect_success 'mode change in one branch: keep changed version' '
: >file1 &&
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index 3fb3368..812c9cd 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -5,7 +5,6 @@
test_description='Test export of commits to CVS'
. ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
if ! test_have_prereq PERL; then
skip_all='skipping git cvsexportcommit tests, perl not available'
diff --git a/t/test-lib.sh b/t/test-lib.sh
index b25249e..5968157 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '
ln -s x y && test -h y
'
+test_lazy_prereq FILEMODE '
+ test "$(git config --bool core.filemode)" = true
+'
+
test_lazy_prereq CASE_INSENSITIVE_FS '
echo good >CamelCase &&
echo bad >camelcase &&