http: add support for disabling SSL revocation checks in cURL
[gitweb.git] / t / test-lib.sh
index 78f7097746fc88f1de5321e5f78d9aec8c5e0b5f..44288cbb598435a5dfff05e8e895cca85e53e804 100644 (file)
@@ -867,7 +867,7 @@ then
                # handle only executables, unless they are shell libraries that
                # need to be in the exec-path.
                test -x "$1" ||
-               test "# " = "$(head -c 2 <"$1")" ||
+               test "# " = "$(test_copy_bytes 2 <"$1")" ||
                return;
 
                base=$(basename "$1")
@@ -882,7 +882,7 @@ then
                # do not override scripts
                if test -x "$symlink_target" &&
                    test ! -d "$symlink_target" &&
-                   test "#!" != "$(head -c 2 < "$symlink_target")"
+                   test "#!" != "$(test_copy_bytes 2 <"$symlink_target")"
                then
                        symlink_target=../valgrind.sh
                fi
@@ -1104,6 +1104,20 @@ test_lazy_prereq CASE_INSENSITIVE_FS '
        test "$(cat CamelCase)" != good
 '
 
+test_lazy_prereq FUNNYNAMES '
+       test_have_prereq !MINGW &&
+       touch -- \
+               "FUNNYNAMES tab embedded" \
+               "FUNNYNAMES \"quote embedded\"" \
+               "FUNNYNAMES newline
+embedded" 2>/dev/null &&
+       rm -- \
+               "FUNNYNAMES tab embedded" \
+               "FUNNYNAMES \"quote embedded\"" \
+               "FUNNYNAMES newline
+embedded" 2>/dev/null
+'
+
 test_lazy_prereq UTF8_NFD_TO_NFC '
        # check whether FS converts nfd unicode to nfc
        auml=$(printf "\303\244")