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>
Jonathan Nieder committed
Nov 25, 2013 at 13:02 UTC
b018c73526ca9d941c64d6a41d9c24968de38c2b
8 files changed
+4
-17
t/lib-prereq-FILEMODE.sh
deleted
-11
@@ -1,11 +0,0 @@
1
-#!/bin/sh
2
-#
3
-# Copyright (c) 2010 Ævar Arnfjörð Bjarmason
4
-#
5
-
6
-if test "$(git config --bool core.filemode)" = false
7
-then
8
- say 'filemode disabled on the filesystem'
9
-else
10
- test_set_prereq FILEMODE
11
-fi
t/t3701-add-interactive.sh
-1
@@ -2,7 +2,6 @@
2
3
test_description='add -i basic tests'
4
. ./test-lib.sh
5
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
5
6
if ! test_have_prereq PERL
7
then
t/t4102-apply-rename.sh
-1
@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
7
8
'
9
. ./test-lib.sh
10
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
10
11
# setup
12
t/t4120-apply-popt.sh
-1
@@ -6,7 +6,6 @@
6
test_description='git apply -p handling.'
7
8
. ./test-lib.sh
9
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
9
10
test_expect_success setup '
11
mkdir sub &&
t/t4129-apply-samemode.sh
-1
@@ -3,7 +3,6 @@
3
test_description='applying patch with mode bits'
4
5
. ./test-lib.sh
6
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
6
7
test_expect_success setup '
8
echo original >file &&
t/t6031-merge-recursive.sh
-1
@@ -2,7 +2,6 @@
2
3
test_description='merge-recursive: handle file mode'
4
. ./test-lib.sh
5
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
5
6
test_expect_success 'mode change in one branch: keep changed version' '
7
: >file1 &&
t/t9200-git-cvsexportcommit.sh
-1
@@ -5,7 +5,6 @@
5
test_description='Test export of commits to CVS'
6
7
. ./test-lib.sh
8
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
8
9
if ! test_have_prereq PERL; then
10
skip_all='skipping git cvsexportcommit tests, perl not available'
t/test-lib.sh
+4
@@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '
830
ln -s x y && test -h y
831
'
832
833
+test_lazy_prereq FILEMODE '
834
+ test "$(git config --bool core.filemode)" = true
835
+'
836
+
837
test_lazy_prereq CASE_INSENSITIVE_FS '
838
echo good >CamelCase &&
839
echo bad >camelcase &&