]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t0001-init.sh
Merge branch 'jc/codingstyle-compare-with-null'
[thirdparty/git.git] / t / t0001-init.sh
index 77c5ed6a18e7849c4b823f9056dfb34cca951e15..1edd5aeb8f01d490b1cceba2c1d67df181868280 100755 (executable)
@@ -392,13 +392,6 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
        test_path_is_dir realgitdir/refs
 '
 
-# Tests for the hidden file attribute on windows
-is_hidden () {
-       # Use the output of `attrib`, ignore the absolute path
-       case "$(attrib "$1")" in *H*?:*) return 0;; esac
-       return 1
-}
-
 test_expect_success MINGW '.git hidden' '
        rm -rf newdir &&
        (
@@ -406,7 +399,7 @@ test_expect_success MINGW '.git hidden' '
                mkdir newdir &&
                cd newdir &&
                git init &&
-               is_hidden .git
+               test_path_is_hidden .git
        ) &&
        check_config newdir/.git false unset
 '
@@ -467,8 +460,8 @@ test_expect_success MINGW 'redirect std handles' '
                GIT_REDIRECT_STDOUT=output.txt \
                GIT_REDIRECT_STDERR="2>&1" \
                git rev-parse --git-dir --verify refs/invalid &&
-       printf ".git\nfatal: Needed a single revision\n" >expect &&
-       test_cmp expect output.txt
+       grep "^\\.git\$" output.txt &&
+       grep "Needed a single revision" output.txt
 '
 
 test_done