diff options
Diffstat (limited to 'engines/testbed/fs.cpp')
-rw-r--r-- | engines/testbed/fs.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/testbed/fs.cpp b/engines/testbed/fs.cpp index b0ef8f8d46..67062c17db 100644 --- a/engines/testbed/fs.cpp +++ b/engines/testbed/fs.cpp @@ -151,8 +151,21 @@ FSTestSuite::FSTestSuite() { addTest("ReadingFile", &FStests::testReadFile, false); addTest("WritingFile", &FStests::testWriteFile, false); } + const char *FSTestSuite::getName() const { return "FS"; } +void FSTestSuite::enable(bool flag) { + const Common::String &path = ConfMan.get("path"); + Common::FSNode gameRoot(path); + + Common::FSNode gameIdentificationFile = gameRoot.getChild("TESTBED"); + if (!gameIdentificationFile.exists()) { + logPrintf("WARNING! : Game Data not found. Skipping FS tests\n"); + return; + } + Testsuite::enable(flag); +} + } // End of namespace Testbed |