Skip to content

Commit

Permalink
mingw: make is_hidden tests in t0001/t5611 more robust
Browse files Browse the repository at this point in the history
We should not actually expect the first `attrib.exe` in the PATH to
be the one we are looking for. Or that it is in the PATH, for that
matter.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Feb 21, 2017
1 parent 9c157ed commit 1e2c239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion t/t0001-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ test_expect_success SYMLINKS 're-init to move gitdir symlink' '
# 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
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
return 1
}

Expand Down
2 changes: 1 addition & 1 deletion t/t5611-clone-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ test_expect_success 'clone -c config is available during clone' '
# 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
case "$("$SYSTEMROOT"/system32/attrib "$1")" in *H*?:*) return 0;; esac
return 1
}

Expand Down

0 comments on commit 1e2c239

Please sign in to comment.