add Path::dir_entries()
This commit is contained in:
1 parent
e3cb7b15b4
commit
c001fca012
3 files changed
+29
No files matched your search
@@ -1,5 +1,6 @@
|
||||
#include "gtest/gtest.h"
|
||||
#include "jes/Path.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace jes;
|
||||
|
||||
@@ -44,3 +45,10 @@ TEST(PathTest, exists)
|
||||
EXPECT_TRUE(Path("runtime").exists());
|
||||
EXPECT_FALSE(Path("foobar").exists());
|
||||
}
|
||||
|
||||
TEST(PathTest, dir_entries)
|
||||
{
|
||||
auto dir_entries = Path(".").dir_entries();
|
||||
EXPECT_TRUE(std::find(dir_entries.begin(), dir_entries.end(), "runtime") != dir_entries.end());
|
||||
EXPECT_FALSE(std::find(dir_entries.begin(), dir_entries.end(), "foobar") != dir_entries.end());
|
||||
}
|
||||
Reference in new issue
Block a user