|
|
@ -3,6 +3,7 @@ |
|
|
|
#include "TestBase.h"
|
|
|
|
#include "Configuration/FileOperations.h"
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
int main (int argc, char* argv[]) { |
|
|
|
|
|
|
@ -25,9 +26,40 @@ int main (int argc, char* argv[]) { |
|
|
|
|
|
|
|
/*TEST_BEGIN( "Test cleanPath" );
|
|
|
|
ASSERT_THROW( cleanPath("/path/to/location") == "/path/to/location" ); |
|
|
|
std::cout << cleanPath("../../path") << std::endl; |
|
|
|
ASSERT_THROW( cleanPath("../../path") == "/path" ); |
|
|
|
ASSERT_THROW( cleanPath("./path") == "/path" ); |
|
|
|
ASSERT_THROW( cleanPath("//path//to") == "/path/to" ); |
|
|
|
//TODO need to test windows style paths also
|
|
|
|
TEST_END();*/ |
|
|
|
|
|
|
|
|
|
|
|
TEST_BEGIN( "Test getFileExtention" ); |
|
|
|
ASSERT_THROW( getFileExtention("test.txt") == "txt" ); |
|
|
|
ASSERT_THROW( getFileExtention("test.md.txt") == "txt" ); |
|
|
|
ASSERT_THROW( getFileExtention("/path/to/place/test.md") == "md" ); |
|
|
|
ASSERT_THROW( getFileExtention("test") == "" ); |
|
|
|
ASSERT_THROW( getFileExtention("") == "" ); |
|
|
|
TEST_END(); |
|
|
|
|
|
|
|
|
|
|
|
TEST_BEGIN( "Test listDirectoryContents" ); |
|
|
|
ASSERT_THROW( false ); |
|
|
|
TEST_END(); |
|
|
|
|
|
|
|
|
|
|
|
/*TEST_BEGIN( "Test listAllFiles" );
|
|
|
|
ASSERT_THROW( false ); |
|
|
|
TEST_END(); |
|
|
|
|
|
|
|
|
|
|
|
TEST_BEGIN( "Test openFile" ); |
|
|
|
ASSERT_THROW( false ); |
|
|
|
TEST_END(); |
|
|
|
|
|
|
|
|
|
|
|
TEST_BEGIN( "Test writeToTextFile" ); |
|
|
|
ASSERT_THROW( true ); |
|
|
|
TEST_END();*/ |
|
|
|
|
|
|
|
return 0; |
|
|
|