Emulate ENOTDIR better

This commit is contained in:
Justine Tunney 2023-08-16 20:11:19 -07:00
parent b76b2be2d0
commit 8d1c81ac9f
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
35 changed files with 80 additions and 50 deletions

View file

@ -93,9 +93,10 @@ TEST(__zipos_normpath, vectors) {
{"./", ""},
{"..", ""},
{"../", ""},
{"foo/", "foo/"},
{"../abc/def", "abc/def"},
{"../abc/def/..", "abc"},
{"../abc/././././def/..", "abc"},
{"../abc/def/..", "abc/"},
{"../abc/././././def/..", "abc/"},
{"////../abc/def", "abc/def"},
{"/../def", "def"},
{"../def", "def"},
@ -121,11 +122,11 @@ TEST(__zipos_normpath, vectors) {
{"../../../a", "a"},
{"../a../../a", "a"},
{"cccc/abc////..////.//../", ""},
{"aaaa/cccc/abc////..////.//../", "aaaa"},
{"..//////.///..////..////.//////abc////.////..////def//abc/..", "def"},
{"aaaa/cccc/abc////..////.//../", "aaaa/"},
{"..//////.///..////..////.//////abc////.////..////def//abc/..", "def/"},
{"////////////..//////.///..////..////.//////abc////.////..////def//abc/"
"..",
"def"},
"def/"},
};
int fails = 0;