23 lines
487 B
C++
23 lines
487 B
C++
|
#include <script_parser.h>
|
||
|
|
||
|
#include <boost/test/unit_test.hpp>
|
||
|
#include <fstream>
|
||
|
#include <iostream>
|
||
|
|
||
|
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 {
|
||
|
std::stringstream strbuf;
|
||
|
strbuf << script.rdbuf();
|
||
|
std::string contents(strbuf.str());
|
||
|
cout << contents << endl;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|