X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Ftest%2Ftest-unit-file.c;h=22ac76de564b15ae49e0a989ba143a81031ee2ff;hb=2eec67acbb00593e414549a7e5b35eb7dd776b1b;hp=d6a7d439150be1e0c4168f0447c7bb7ac1367ae1;hpb=4d8629de8bd0f837f99981267d10e71d1f72e47d;p=elogind.git
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index d6a7d4391..22ac76de5 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -20,7 +20,6 @@
along with systemd; If not, see .
***/
-#include
#include
#include
#include
@@ -137,6 +136,20 @@ static void test_config_parse_exec(void) {
c1 = c1->command_next;
check_execcommand(c1, "/RValue/slashes2", "///argv0", "r1", NULL, false);
+ log_info("/* honour_argv0, no args */");
+ r = config_parse_exec(NULL, "fake", 3, "section", 1,
+ "LValue", 0, "@/RValue",
+ &c, NULL);
+ assert_se(r == 0);
+ assert_se(c1->command_next == NULL);
+
+ log_info("/* no command, check for bad memory access */");
+ r = config_parse_exec(NULL, "fake", 3, "section", 1,
+ "LValue", 0, " ",
+ &c, NULL);
+ assert_se(r == 0);
+ assert_se(c1->command_next == NULL);
+
log_info("/* ignore && honour_argv0 */");
r = config_parse_exec(NULL, "fake", 4, "section", 1,
"LValue", 0, "-@/RValue///slashes3 argv0a r1",