t0060: add test for prefix_path when path == work tree
[gitweb.git] / t / t0060-path-utils.sh
index 0bba9887e9cc5dcdd9eb62a56bcd74c5c9acd644..b8e92e1a2affe8a60caecc770db188e5090a29f0 100755 (executable)
@@ -195,6 +195,12 @@ test_expect_failure SYMLINKS 'prefix_path works with absolute paths to work tree
        test "$(test-path-utils prefix_path prefix "$(pwd)/symlink")" = "symlink"
 '
 
+test_expect_success 'prefix_path works with only absolute path to work tree' '
+       echo "" >expected &&
+       test-path-utils prefix_path prefix "$(pwd)" >actual &&
+       test_cmp expected actual
+'
+
 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