summaryrefslogtreecommitdiff
path: root/tests/path/core.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2019-12-10 20:39:38 +0100
committerGitHub <noreply@github.com>2019-12-10 20:39:38 +0100
commit45c6187cbfdcfee2bcf59a1ed3a853065142f203 (patch)
treeb3f714ab9fab46c3f879a6fcb55ef6ab173701ed /tests/path/core.c
parent3828d7afdd08b595584048e8e4dab6ddd4506ed1 (diff)
parent34c929572a635a6599dc8ff06a87c7c0a324caff (diff)
downloadlibgit2-maint/v0.27.tar.gz
Merge pull request #5329 from pks-t/ethomson/v0.27.10v0.27.10maint/v0.27
Security release v0.27.10
Diffstat (limited to 'tests/path/core.c')
-rw-r--r--tests/path/core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/path/core.c b/tests/path/core.c
index 0ab41ea50..dcc85fb78 100644
--- a/tests/path/core.c
+++ b/tests/path/core.c
@@ -352,3 +352,14 @@ void test_path_core__join_unrooted(void)
git_buf_free(&out);
}
+
+void test_path_core__join_unrooted_respects_funny_windows_roots(void)
+{
+ test_join_unrooted("💩:/foo/bar/foobar", 9, "bar/foobar", "💩:/foo");
+ test_join_unrooted("💩:/foo/bar/foobar", 13, "foobar", "💩:/foo/bar");
+ test_join_unrooted("💩:/foo", 5, "💩:/foo", "💩:/asdf");
+ test_join_unrooted("💩:/foo/bar", 5, "💩:/foo/bar", "💩:/asdf");
+ test_join_unrooted("💩:/foo/bar/foobar", 9, "💩:/foo/bar/foobar", "💩:/foo");
+ test_join_unrooted("💩:/foo/bar/foobar", 13, "💩:/foo/bar/foobar", "💩:/foo/bar");
+ test_join_unrooted("💩:/foo/bar/foobar", 9, "💩:/foo/bar/foobar", "💩:/foo/");
+}