Skip to content

Commit b82a16f

Browse files
committed
fix
1 parent a5ffb5b commit b82a16f

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/testpath.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,8 @@ class TestPath : public TestFixture {
516516
ASSERT_EQUALS(expected, Path::getAbsoluteFilePath(Path::join(cwd, "testabspath.txt")));
517517

518518
std::string cwd_up = Path::getPathFromFilename(cwd);
519-
cwd_up.pop_back(); // remove trailing slash
519+
if (cwd_up != "/")
520+
cwd_up.pop_back(); // remove trailing slash
520521
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "..")));
521522
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "../")));
522523
ASSERT_EQUALS(cwd_up, Path::getAbsoluteFilePath(Path::join(cwd, "..\\")));

0 commit comments

Comments
 (0)