summaryrefslogtreecommitdiff
path: root/src/kernel/tests
diff options
context:
space:
mode:
authordzwdz2021-11-04 07:35:23 +0000
committerdzwdz2021-11-04 07:35:23 +0000
commitd9b7a1a5d222a618b7530ecfa42b1ccb4f9a5f4c (patch)
tree99732f38912a7db5bf8fabc610a03a9ca366a4be /src/kernel/tests
parent0c24ed6eb939bd68c9a882d21fd45e2079e1bb66 (diff)
parente0ddaaa6290f74fcce6e067c1e5f1c9c87974f4c (diff)
Merge branch 'main' into fork2
Diffstat (limited to 'src/kernel/tests')
-rw-r--r--src/kernel/tests/vfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/kernel/tests/vfs.c b/src/kernel/tests/vfs.c
index 8b450e5..339c6bd 100644
--- a/src/kernel/tests/vfs.c
+++ b/src/kernel/tests/vfs.c
@@ -38,6 +38,12 @@ TEST(path_simplify) {
TEST_WRAPPER("/asdf/.", "/asdf/");
TEST_WRAPPER("/asdf//.", "/asdf/");
+ TEST_WRAPPER("/foo/bar/..", "/foo/");
+ TEST_WRAPPER("/foo/bar/../bar", "/foo/bar");
+ TEST_WRAPPER("/foo/bar/../bar/", "/foo/bar/");
+ TEST_WRAPPER("/foo/bar/xyz/..", "/foo/bar/");
+ TEST_WRAPPER("/foo/bar/xyz/../", "/foo/bar/");
+
// going under the root or close to it
TEST_WRAPPER("/..", NULL);
TEST_WRAPPER("/../asdf", NULL);