Fix AppDataDirExists test on Travis CI

This commit is contained in:
Sebastian Messmer 2018-05-18 23:00:37 -07:00
parent b49435f405
commit d2beafa03e

View File

@ -13,8 +13,13 @@ TEST(HomedirTest, HomedirExists) {
EXPECT_TRUE(bf::exists(HomeDirectory::get())); EXPECT_TRUE(bf::exists(HomeDirectory::get()));
} }
TEST(HomedirTest, AppDataDirExists) { TEST(HomedirTest, AppDataDirIsValid) {
EXPECT_TRUE(bf::exists(HomeDirectory::getXDGDataDir())); auto dir = HomeDirectory::getXDGDataDir();
EXPECT_FALSE(dir.empty());
EXPECT_GE(dir.size(), 2u); // has at least two components
for(const auto& component : dir) {
EXPECT_TRUE(component.native() == "/" || bf::native(component.native()));
}
} }
TEST(HomedirTest, FakeHomeDirectorySetsHomedirCorrectly) { TEST(HomedirTest, FakeHomeDirectorySetsHomedirCorrectly) {