]> git.ipfire.org Git - thirdparty/git.git/commitdiff
test: make FILEMODE a lazy prereq
authorJonathan Nieder <jrnieder@gmail.com>
Mon, 25 Nov 2013 21:02:16 +0000 (13:02 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 26 Nov 2013 22:21:26 +0000 (14:21 -0800)
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>
t/lib-prereq-FILEMODE.sh [deleted file]
t/t3701-add-interactive.sh
t/t4102-apply-rename.sh
t/t4120-apply-popt.sh
t/t4129-apply-samemode.sh
t/t6031-merge-recursive.sh
t/t9200-git-cvsexportcommit.sh
t/test-lib.sh

diff --git a/t/lib-prereq-FILEMODE.sh b/t/lib-prereq-FILEMODE.sh
deleted file mode 100644 (file)
index bce5a4c..0000000
+++ /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
index 9dc91d09d7ef3c66c39bcf930bb486312cf291af..24ddd8a704b22e32322b8ef52bbd0d2e6195e5e1 100755 (executable)
@@ -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
index e3ea3d5114b8f6a09b79c9a1323c563da0c7b170..49e2d6c34983c7e4620739a52ecc03cf158efe3a 100755 (executable)
@@ -7,7 +7,6 @@ test_description='git apply handling copy/rename patch.
 
 '
 . ./test-lib.sh
-. "$TEST_DIRECTORY"/lib-prereq-FILEMODE.sh
 
 # setup
 
index c5fecdfed43dc5682307dd0fdb66ddd78dece056..497b62868d4aa0f81c62178ee9b1a5a108b89c0d 100755 (executable)
@@ -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 &&
index 0d36ebdc8653d7d22ab5831c1f154db452e4558e..c268298eaf5672c649ca3e4815dc4f43d71efece 100755 (executable)
@@ -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 &&
index 1cd649e245e49735afa539ab0e982036154c4797..a953f1b55cc26aae703d3c84f74df3265cc2ed57 100755 (executable)
@@ -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 &&
index 3fb3368903686c8588c51e881beaee1f29808575..812c9cd462f58f6fd76e3d339e95137aee598801 100755 (executable)
@@ -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'
index b25249ec4cc2844f5cd7491dd5fcc88c884ff450..596815704a0a10f5de11bb88d15927e6136fe43c 100644 (file)
@@ -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 &&