1
Fork 0

More tests for splitPath.

This commit is contained in:
Juliusz Chroboczek 2024-04-09 15:11:40 +02:00
parent eee6650336
commit c4c7d0b60d
1 changed files with 8 additions and 1 deletions

View File

@ -98,13 +98,20 @@ func TestParseSplit(t *testing.T) {
a := []struct{ p, a, b, c string }{
{"", "", "", ""},
{"/a", "/a", "", ""},
{"/.a", "", ".a", ""},
{"/.a/", "", ".a", "/"},
{"/.a/b", "", ".a", "/b"},
{"/.a/b/", "", ".a", "/b/"},
{"/.a/b/c", "", ".a", "/b/c"},
{"/.a/b/c", "", ".a", "/b/c"},
{"/.a/b/.c/", "", ".a", "/b/.c/"},
{"/a/.b", "/a", ".b", ""},
{"/a/.b/", "/a", ".b", "/"},
{"/a/.b/c", "/a", ".b", "/c"},
{"/a/.b/c/", "/a", ".b", "/c/"},
{"/a/.b/c/d", "/a", ".b", "/c/d"},
{"/a/.b/c/d/", "/a", ".b", "/c/d/"},
{"/a/.b/c/d./", "/a", ".b", "/c/d./"},
{"/a/.b/c/.d/", "/a", ".b", "/c/.d/"},
}
for _, pabc := range a {