diff options
Diffstat (limited to 'dviware/dvisvgm/tests/FilePathTest.cpp')
-rw-r--r-- | dviware/dvisvgm/tests/FilePathTest.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/dviware/dvisvgm/tests/FilePathTest.cpp b/dviware/dvisvgm/tests/FilePathTest.cpp index 81cb55f3ba..6cce81ef43 100644 --- a/dviware/dvisvgm/tests/FilePathTest.cpp +++ b/dviware/dvisvgm/tests/FilePathTest.cpp @@ -30,6 +30,15 @@ using namespace std; +TEST(FilePathTest, empty) { + FilePath path; + ASSERT_TRUE(path.empty()); + path.set("/a/b/c/d", false, "/"); + ASSERT_FALSE(path.empty()); + ASSERT_EQ(path.absolute(), "/a/b/c/d"); +} + + TEST(FilePathTest, dir1) { FilePath fp("a/b/c/d", false, "/"); ASSERT_EQ(fp.absolute(), "/a/b/c/d"); @@ -91,4 +100,3 @@ TEST(FilePathTest, autodetect) { ASSERT_FALSE(fp2.empty()); ASSERT_EQ(fp2.absolute(), FileSystem::getcwd()); } - |