| 28 | #include "console/console.h" |
| 29 | |
| 30 | TEST(Platform, ExcludedDirectories) |
| 31 | { |
| 32 | // Just dump everything under the current directory. We should |
| 33 | // find at least one file. |
| 34 | |
| 35 | // Exclude .svn and CVS |
| 36 | Platform::clearExcludedDirectories(); |
| 37 | Platform::addExcludedDirectory(".svn"); |
| 38 | Platform::addExcludedDirectory("CVS"); |
| 39 | |
| 40 | EXPECT_TRUE(Platform::isExcludedDirectory(".svn")) |
| 41 | << "On list, should be excluded."; |
| 42 | EXPECT_TRUE(Platform::isExcludedDirectory("CVS")) |
| 43 | << "On list, should be excluded."; |
| 44 | EXPECT_FALSE(Platform::isExcludedDirectory("foo")) |
| 45 | << "Doesn't match list, shouldn't be excluded."; |
| 46 | EXPECT_FALSE(Platform::isExcludedDirectory(".svnCVS")) |
| 47 | << "Looks like a duck, but it shouldn't be excluded cuz it's distinct from all entries on the exclusion list."; |
| 48 | |
| 49 | // Ok, now our exclusion list is setup, so let's dump some paths. |
| 50 | Vector<Platform::FileInfo> pathInfo; |
| 51 | Platform::dumpPath(Platform::getCurrentDirectory(), pathInfo, 2); |
| 52 | EXPECT_GT(pathInfo.size(), 0) |
| 53 | << "Should find at least SOMETHING in the current directory!"; |
| 54 | |
| 55 | // This'll nuke info if we run it in a live situation... so don't run unit |
| 56 | // tests in a live situation. ;) |
| 57 | Platform::clearExcludedDirectories(); |
| 58 | }; |
| 59 | |
| 60 | TEST(File, TouchAndTime) |
| 61 | { |
nothing calls this directly
no test coverage detected