diff options
Diffstat (limited to 'lib/tests')
| -rw-r--r-- | lib/tests/test_cmd.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/tests/test_cmd.c b/lib/tests/test_cmd.c index 0372c477..6b4bc35f 100644 --- a/lib/tests/test_cmd.c +++ b/lib/tests/test_cmd.c | |||
| @@ -51,7 +51,7 @@ main (int argc, char **argv) | |||
| 51 | int c; | 51 | int c; |
| 52 | int result = UNSET; | 52 | int result = UNSET; |
| 53 | 53 | ||
| 54 | plan_tests(50); | 54 | plan_tests(51); |
| 55 | 55 | ||
| 56 | diag ("Running plain echo command, set one"); | 56 | diag ("Running plain echo command, set one"); |
| 57 | 57 | ||
| @@ -206,6 +206,16 @@ main (int argc, char **argv) | |||
| 206 | 206 | ||
| 207 | 207 | ||
| 208 | /* ensure everything is empty again */ | 208 | /* ensure everything is empty again */ |
| 209 | result = UNSET; | ||
| 210 | |||
| 211 | command = (char *)malloc(COMMAND_LINE); | ||
| 212 | strcpy(command, "/bin/sh -c 'exit 7'"); | ||
| 213 | result = cmd_run (command, NULL, NULL, 0); | ||
| 214 | |||
| 215 | ok (result == 7, "Get return code 7 from /bin/sh"); | ||
| 216 | |||
| 217 | |||
| 218 | /* ensure everything is empty again */ | ||
| 209 | memset (&chld_out, 0, sizeof (output)); | 219 | memset (&chld_out, 0, sizeof (output)); |
| 210 | memset (&chld_err, 0, sizeof (output)); | 220 | memset (&chld_err, 0, sizeof (output)); |
| 211 | result = UNSET; | 221 | result = UNSET; |
