]> git.lizzy.rs Git - minetest.git/blobdiff - src/unittest/test_filepath.cpp
Fix segfault in deprecation logging due to tail call, log by default (#10174)
[minetest.git] / src / unittest / test_filepath.cpp
index 5e3cdcc089fbf86659bb4ecdaba06ac81bb1b3d9..ac2d69b5a443b4a5e85ce132dbe1cf64f7fcd152 100644 (file)
@@ -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 == "");