0
0
mirror of https://github.com/rbock/sqlpp11.git synced 2024-11-16 12:51:13 +08:00

suppress output win32, win64, linux

This commit is contained in:
strangeqargo 2016-06-11 14:46:21 +03:00
parent d201de833b
commit 2da5e76d3a

View File

@ -8,19 +8,27 @@
int testSqlFile(const int expectedResult , const std::string pathToSqlFile ){
#if defined _WIN64 || defined _WIN32
std::string nullOutput = " > nul 2>&1";
#else
std::string nullOutput = " > /dev/null 2>&1";
#endif
std::string ddlHeaderPath = "test_scripts/ddl2cpp_test_result_header";
std::string args =
" scripts/ddl2cpp -fail-on-parse " +
pathToSqlFile + " " +
ddlHeaderPath +
" ddlcpp2_test_namespace";
" ddlcpp2_test_namespace "+
nullOutput
;
auto python_args = test_scripts_pythonPath + args.c_str();
return system(python_args.c_str());
}
int ddl2cpp(int, char* [])
{
std::ifstream file("scripts/ddl2cpp");
@ -30,7 +38,6 @@ int ddl2cpp(int, char* [])
exit(1);
}
assert(testSqlFile (0, "test_scripts/ddl2cpp_sample_good.sql") == 0);
assert(testSqlFile (0, "test_scripts/ddl2cpp_sample_bad.sql") > 0);