aboutsummaryrefslogtreecommitdiff
path: root/src/unittest/test_filepath.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/unittest/test_filepath.cpp')
-rw-r--r--src/unittest/test_filepath.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/unittest/test_filepath.cpp b/src/unittest/test_filepath.cpp
index 5e3cdcc08..ac2d69b5a 100644
--- a/src/unittest/test_filepath.cpp
+++ b/src/unittest/test_filepath.cpp
@@ -251,7 +251,10 @@ void TestFilePath::testRemoveRelativePathComponent()
UASSERT(result == p("/home/user/minetest/worlds/world1"));
path = p(".");
result = fs::RemoveRelativePathComponents(path);
- UASSERT(result == ".");
+ UASSERT(result == "");
+ path = p("../a");
+ result = fs::RemoveRelativePathComponents(path);
+ UASSERT(result == "");
path = p("./subdir/../..");
result = fs::RemoveRelativePathComponents(path);
UASSERT(result == "");