1 parent a5ffb5b commit b82a16fCopy full SHA for b82a16f
1 file changed
test/testpath.cpp
@@ -516,7 +516,8 @@ class TestPath : public TestFixture {
516
ASSERT_EQUALS(expected, Path::getAbsoluteFilePath(Path::join(cwd, "testabspath.txt")));
517
518
std::string cwd_up = Path::getPathFromFilename(cwd);
519
- cwd_up.pop_back(); // remove trailing slash
+ if (cwd_up != "/")
520
+ cwd_up.pop_back(); // remove trailing slash
521
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "..")));
522
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "../")));
523
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "..\\")));
0 commit comments