path: root/t/
diff options
authorJunio C Hamano <>2016-02-17 18:13:28 (GMT)
committerJunio C Hamano <>2016-02-17 18:13:29 (GMT)
commit4b589e5b28af077ddbdd5b72b6217c7447d45cb5 (patch)
tree778e54e0927aa51f78a027c71af44f703270bcd8 /t/
parent9f03176ef679ea5e0fb9088529180db72ae0764b (diff)
parent80ce6c25a4289835e197004a54ca75401bea55dc (diff)
Merge branch 'js/mingw-tests'
Test scripts have been updated to remove assumptions that are not portable between Git for POSIX and Git for Windows, or to skip ones with expectations that are not satisfiable on Git for Windows. * js/mingw-tests: (21 commits) gitignore: ignore generated test-fake-ssh executable mingw: do not bother to test funny file names mingw: skip a test in t9130 that cannot pass on Windows mingw: handle the missing POSIXPERM prereq in t9124 mingw: avoid illegal filename in t9118 mingw: mark t9100's test cases with appropriate prereqs t0008: avoid absolute path mingw: work around pwd issues in the tests mingw: fix t9700's assumption about directory separators mingw: skip test in t1508 that fails due to path conversion tests: turn off git-daemon tests if FIFOs are not available mingw: disable mkfifo-based tests mingw: accomodate t0060-path-utils for MSYS2 mingw: fix mingw: let lstat() fail with errno == ENOTDIR when appropriate mingw: try to delete target directory before renaming mingw: prepare the TMPDIR environment variable for shell scripts mingw: factor out Windows specific environment setup stop assuming that absolute paths start with a slash mingw: do not trust MSYS2's MinGW ...
Diffstat (limited to 't/')
1 files changed, 9 insertions, 0 deletions
diff --git a/t/ b/t/
index f0152a7..8532a02 100755
--- a/t/
+++ b/t/
@@ -36,12 +36,21 @@ if test $rootoff = 2; then
rootoff= # we are on Unix
+ # In MSYS2, the root directory "/" is translated into a Windows
+ # directory *with* trailing slash. Let's test for that and adjust
+ # our expected longest ancestor length accordingly.
+ case "$(test-path-utils print_path /)" in
+ */) rootslash=1;;
+ *) rootslash=0;;
+ esac
ancestor() {
# We do some math with the expected ancestor length.
if test -n "$rootoff" && test "x$expected" != x-1; then
+ expected=$(($expected-$rootslash))
+ test $expected -lt 0 ||
test_expect_success "longest ancestor: $1 $2 => $expected" \