|
@@ -350,6 +350,10 @@ START_TEST(test_remove_dot_segments)
|
|
{".file.ext", ".file.ext"},
|
|
{".file.ext", ".file.ext"},
|
|
{"..file.ext", "..file.ext"},
|
|
{"..file.ext", "..file.ext"},
|
|
{"file", "file"},
|
|
{"file", "file"},
|
|
|
|
+ {"/x/../", "/"},
|
|
|
|
+ {"/x/../../", "/"},
|
|
|
|
+ {"/x/.././", "/"},
|
|
|
|
+ {"/./x/.././", "/"},
|
|
|
|
|
|
/* Windows specific */
|
|
/* Windows specific */
|
|
{"\\file.ext", "/file.ext"},
|
|
{"\\file.ext", "/file.ext"},
|
|
@@ -357,6 +361,20 @@ START_TEST(test_remove_dot_segments)
|
|
{"/file.", "/file"},
|
|
{"/file.", "/file"},
|
|
{"/path\\to.\\.\\file.", "/path/to/file"},
|
|
{"/path\\to.\\.\\file.", "/path/to/file"},
|
|
|
|
|
|
|
|
+ /* Multiple dots and slashes */
|
|
|
|
+ {"\\//\\\\x", "/x"},
|
|
|
|
+ {"//", "/"},
|
|
|
|
+ {"/./", "/"},
|
|
|
|
+ {"/../", "/"},
|
|
|
|
+ {"/.../", "/"},
|
|
|
|
+ {"/..../", "/"},
|
|
|
|
+ {"/...../", "/"},
|
|
|
|
+ {"/...../", "/"},
|
|
|
|
+ {"/...//", "/"},
|
|
|
|
+ {"/..././", "/"},
|
|
|
|
+ {"/.../../", "/"},
|
|
|
|
+ {"/.../.../", "/"},
|
|
|
|
+
|
|
{NULL, NULL}};
|
|
{NULL, NULL}};
|
|
|
|
|
|
mark_point();
|
|
mark_point();
|