diff options
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r-- | src/test/test-unit-file.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c index 22ac76de56..5a9796df58 100644 --- a/src/test/test-unit-file.c +++ b/src/test/test-unit-file.c @@ -91,6 +91,7 @@ static void check_execcommand(ExecCommand *c, static void test_config_parse_exec(void) { /* int config_parse_exec( + const char *unit, const char *filename, unsigned line, const char *section, @@ -302,6 +303,20 @@ static void test_config_parse_exec(void) { assert_se(r == 0); assert_se(c1->command_next == NULL); + log_info("/* missing ending ' */"); + r = config_parse_exec(NULL, "fake", 4, "section", 1, + "LValue", 0, "/path 'foo", + &c, NULL); + assert_se(r == 0); + assert_se(c1->command_next == NULL); + + log_info("/* missing ending ' with trailing backslash */"); + r = config_parse_exec(NULL, "fake", 4, "section", 1, + "LValue", 0, "/path 'foo\\", + &c, NULL); + assert_se(r == 0); + assert_se(c1->command_next == NULL); + exec_command_free_list(c); } |