summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 34fdd02)
raw | patch | inline | side by side (parent: 34fdd02)
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 10 Jan 2008 07:49:56 +0000 (07:49 +0000) | ||
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | |
Thu, 10 Jan 2008 07:49:56 +0000 (07:49 +0000) |
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1905 f882894a-f735-0410-b71e-b25c423dba1c
lib/tests/test_cmd.c | patch | blob | history |
diff --git a/lib/tests/test_cmd.c b/lib/tests/test_cmd.c
index 0372c4775e5a1b2e3f950f03def102bd941224ae..6b4bc35f502a773eb1f351486eee7a4eabc61ae4 100644 (file)
--- a/lib/tests/test_cmd.c
+++ b/lib/tests/test_cmd.c
int c;
int result = UNSET;
- plan_tests(50);
+ plan_tests(51);
diag ("Running plain echo command, set one");
ok (result != 0, "Get non-zero return code from /bin/sh");
+ /* ensure everything is empty again */
+ result = UNSET;
+
+ command = (char *)malloc(COMMAND_LINE);
+ strcpy(command, "/bin/sh -c 'exit 7'");
+ result = cmd_run (command, NULL, NULL, 0);
+
+ ok (result == 7, "Get return code 7 from /bin/sh");
+
+
/* ensure everything is empty again */
memset (&chld_out, 0, sizeof (output));
memset (&chld_err, 0, sizeof (output));