11 #ifndef TEST_RUNTOOL_H
12 #define TEST_RUNTOOL_H
14 #ifndef UT_VALGRINDED_H
17 #ifndef ARB_STRARRAY_H
34 cmd_list.
cat(piped_command);
36 cmd_list.
cat(
";exit $((");
37 for (
int i = 0; i<=pipeSymbolCount; ++i) {
38 if (i) cmd_list.
cat(
" | ");
39 cmd_list.
nprintf(30,
"${PIPESTATUS[%i]}", i);
61 piped_command = first_pipe+1;
70 return checked_repiped_cmd;
104 #define RUN_TOOL(cmdline) test_runtool::valgrinded_system(cmdline)
105 #define RUN_TOOL_NEVER_VALGRIND(cmdline) GBK_system(cmdline)
109 #define TEST_RUN_TOOL(cmdline) TEST_EXPECT_NO_ERROR(RUN_TOOL(cmdline))
110 #define TEST_RUN_TOOL_NEVER_VALGRIND(cmdline) TEST_EXPECT_NO_ERROR(RUN_TOOL_NEVER_VALGRIND(cmdline))
111 #define TEST_RUN_TOOL_FAILS(cmdline) TEST_EXPECT_ERROR_CONTAINS(RUN_TOOL(cmdline), "System call failed")
116 #error test_runtool.h included twice
117 #endif // TEST_RUNTOOL_H
GB_ERROR GBK_system(const char *system_command)
char * ARB_strdup(const char *str)
void cat(const char *from)
char * ARB_strpartdup(const char *start, const char *end)
const char * find_pipe_symbol(const char *str)
static void error(const char *msg)
char * GBT_join_strings(const CharPtrArray &strings, char separator)
#define make_valgrinded_call(command)
char * GBK_singlequote(const char *arg)
void nprintf(size_t maxlen, const char *templat,...) __ATTR__FORMAT_MEMBER(2)
bool will_valgrind_calls()
const char * get_data() const
char * GBS_global_string_copy(const char *templat,...)