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 == "");