Branch data Line data Source code
1 : : #include "test_libtestitall_all.h"
2 : :
3 : : /**
4 : : * @brief Check external command success and failure expectations
5 : : *
6 : : * @return Return status code
7 : : */
8 : 1 : Return test_libtestitall_0001(void)
9 : : {
10 : 1 : INITTEST;
11 : :
12 : 1 : const char *command = "true > /dev/null";
13 : :
14 : 1 : ASSERT(SUCCESS == external_call(command,NULL,NULL,COMPLETED,STDERR_SUPPRESS));
15 : :
16 : 1 : command = "false";
17 : :
18 : 1 : ASSERT(SUCCESS == external_call(command,NULL,NULL,FAILURE,STDOUT_SUPPRESS));
19 : :
20 : 1 : command = "true";
21 : :
22 : 1 : ASSERT(SUCCESS == external_call(command,NULL,NULL,COMPLETED,STDERR_SUPPRESS));
23 : :
24 : 1 : RETURN_STATUS;
25 : : }
|