boosttest/src/script_parser.cpp
2022-01-14 14:40:45 +08:00

23 lines
473 B
C++

#include <boost/test/unit_test.hpp>
#include <fstream>
#include <iostream>
#include <script_parser.h>
using namespace boost::unit_test;
using namespace std;
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 <<endl;
}
script.close();
}
return 0;
}