summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-28 10:42:29 -0700
committerJunio C Hamano <gitster@pobox.com>2013-10-28 10:42:30 -0700
commite22c1c7f19914aa0dc1b6fe65bbfafed265d6e7f (patch)
treecc9fe2c10ec884cf474443bca6ac511065c95432 /t
parent3d092bfc6f2d9a998967979f926c661e9762601c (diff)
parent41894ae3a315f75ebc924881c6ce9a69d70ce9c0 (diff)
downloadgit-e22c1c7f19914aa0dc1b6fe65bbfafed265d6e7f.tar.gz
Merge branch 'jx/relative-path-regression-fix'
* jx/relative-path-regression-fix: Use simpler relative_path when set_git_dir relative_path should honor dos-drive-prefix test: use unambigous leading path (/foo) for MSYS
Diffstat (limited to 't')
-rwxr-xr-xt/t0060-path-utils.sh60
1 files changed, 32 insertions, 28 deletions
diff --git a/t/t0060-path-utils.sh b/t/t0060-path-utils.sh
index 2bd5e32745..07c10c8dca 100755
--- a/t/t0060-path-utils.sh
+++ b/t/t0060-path-utils.sh
@@ -190,33 +190,37 @@ test_expect_success SYMLINKS 'real path works on symlinks' '
test "$sym" = "$(test-path-utils real_path "$dir2/syml")"
'
-relative_path /a/b/c/ /a/b/ c/
-relative_path /a/b/c/ /a/b c/
-relative_path /a//b//c/ //a/b// c/ POSIX
-relative_path /a/b /a/b ./
-relative_path /a/b/ /a/b ./
-relative_path /a /a/b ../
-relative_path / /a/b/ ../../
-relative_path /a/c /a/b/ ../c
-relative_path /a/c /a/b ../c
-relative_path /x/y /a/b/ ../../x/y
-relative_path /a/b "<empty>" /a/b
-relative_path /a/b "<null>" /a/b
-relative_path a/b/c/ a/b/ c/
-relative_path a/b/c/ a/b c/
-relative_path a/b//c a//b c
-relative_path a/b/ a/b/ ./
-relative_path a/b/ a/b ./
-relative_path a a/b ../
-relative_path x/y a/b ../../x/y
-relative_path a/c a/b ../c
-relative_path a/b "<empty>" a/b
-relative_path a/b "<null>" a/b
-relative_path "<empty>" /a/b ./
-relative_path "<empty>" "<empty>" ./
-relative_path "<empty>" "<null>" ./
-relative_path "<null>" "<empty>" ./
-relative_path "<null>" "<null>" ./
-relative_path "<null>" /a/b ./
+relative_path /foo/a/b/c/ /foo/a/b/ c/
+relative_path /foo/a/b/c/ /foo/a/b c/
+relative_path /foo/a//b//c/ ///foo/a/b// c/ POSIX
+relative_path /foo/a/b /foo/a/b ./
+relative_path /foo/a/b/ /foo/a/b ./
+relative_path /foo/a /foo/a/b ../
+relative_path / /foo/a/b/ ../../../
+relative_path /foo/a/c /foo/a/b/ ../c
+relative_path /foo/a/c /foo/a/b ../c
+relative_path /foo/x/y /foo/a/b/ ../../x/y
+relative_path /foo/a/b "<empty>" /foo/a/b
+relative_path /foo/a/b "<null>" /foo/a/b
+relative_path foo/a/b/c/ foo/a/b/ c/
+relative_path foo/a/b/c/ foo/a/b c/
+relative_path foo/a/b//c foo/a//b c
+relative_path foo/a/b/ foo/a/b/ ./
+relative_path foo/a/b/ foo/a/b ./
+relative_path foo/a foo/a/b ../
+relative_path foo/x/y foo/a/b ../../x/y
+relative_path foo/a/c foo/a/b ../c
+relative_path foo/a/b /foo/x/y foo/a/b
+relative_path /foo/a/b foo/x/y /foo/a/b
+relative_path d:/a/b D:/a/c ../b MINGW
+relative_path C:/a/b D:/a/c C:/a/b MINGW
+relative_path foo/a/b "<empty>" foo/a/b
+relative_path foo/a/b "<null>" foo/a/b
+relative_path "<empty>" /foo/a/b ./
+relative_path "<empty>" "<empty>" ./
+relative_path "<empty>" "<null>" ./
+relative_path "<null>" "<empty>" ./
+relative_path "<null>" "<null>" ./
+relative_path "<null>" /foo/a/b ./
test_done