diff --git a/Makefile b/Makefile index 244996d..4371d9d 100644 --- a/Makefile +++ b/Makefile @@ -12,4 +12,4 @@ obj/script_parser.o: src/script_parser.cpp include/script_parser.h g++ -o obj/script_parser.o src/script_parser.cpp -c ${INC} test.exe: src/script_parser.cpp - g++ -DTEST src/script_parser.cpp -o test.exe ${INC} \ No newline at end of file + g++ -DTEST src/script_parser.cpp -o test.exe ${INC} ${LIB} \ No newline at end of file diff --git a/src/script_parser.cpp b/src/script_parser.cpp index 0b4ba99..1a2d701 100644 --- a/src/script_parser.cpp +++ b/src/script_parser.cpp @@ -1,34 +1,28 @@ -#ifdef TEST -#else #include -using namespace boost::unit_test; -#endif - #include #include #include #include using namespace std; +using namespace boost::unit_test; int parseScript(const char* path) { ifstream script(path, ios::in); - if (!script.is_open()) { - perror(path); - return ENOENT; - } else { - string line; - while(getline(script, line, '\n')) { - // cout << line <