Skip to content

Commit b018c73

Browse files
jrngitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 30a3318 commit b018c73

8 files changed

+4
-17
lines changed

t/lib-prereq-FILEMODE.sh

Lines changed: 0 additions & 11 deletions
This file was deleted.

t/t3701-add-interactive.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
test_description='add -i basic tests'
44
. ./test-lib.sh
5-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
65

76
if ! test_have_prereq PERL
87
then

t/t4102-apply-rename.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
77
88
'
99
. ./test-lib.sh
10-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
1110

1211
# setup
1312

t/t4120-apply-popt.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
test_description='git apply -p handling.'
77

88
. ./test-lib.sh
9-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
109

1110
test_expect_success setup '
1211
mkdir sub &&

t/t4129-apply-samemode.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
test_description='applying patch with mode bits'
44

55
. ./test-lib.sh
6-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
76

87
test_expect_success setup '
98
echo original >file &&

t/t6031-merge-recursive.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
test_description='merge-recursive: handle file mode'
44
. ./test-lib.sh
5-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
65

76
test_expect_success 'mode change in one branch: keep changed version' '
87
: >file1 &&

t/t9200-git-cvsexportcommit.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
test_description='Test export of commits to CVS'
66

77
. ./test-lib.sh
8-
. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
98

109
if ! test_have_prereq PERL; then
1110
skip_all='skipping git cvsexportcommit tests, perl not available'

t/test-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -830,6 +830,10 @@ test_lazy_prereq SYMLINKS '
830830
ln -s x y && test -h y
831831
'
832832

833+
test_lazy_prereq FILEMODE '
834+
test "$(git config --bool core.filemode)" = true
835+
'
836+
833837
test_lazy_prereq CASE_INSENSITIVE_FS '
834838
echo good >CamelCase &&
835839
echo bad >camelcase &&

0 commit comments

Comments
 (0)