const char *args[]= { "--fubar", 0 };
test_compare(Application::SUCCESS, true_app.run(args));
- test_compare(Application::INVALID, true_app.wait());
+ // Behavior is different if we are running under valgrind
+ if (getenv("TESTS_ENVIRONMENT") and strstr(getenv("TESTS_ENVIRONMENT"), "valgrind"))
+ {
+ test_compare(Application::FAILURE, true_app.wait());
+ }
+ else
+ {
+ test_compare(Application::INVALID, true_app.wait());
+ }
test_compare(0, true_app.stdout_result().size());
return TEST_SUCCESS;