core: interpret \; token in ExecStart as escaped ;

Some commands (like 'find') take a semicolon as separate arg. With
current parser implementation there is no way to pass one.

Patch adds token \;
This commit is contained in:
Oleksii Shevchuk
2012-11-15 16:01:10 +01:00
committed by Zbigniew Jędrzejewski-Szmek
parent 2c5417ade0
commit 7e1a84f552
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -138,6 +138,16 @@ static void test_config_parse_exec(void) {
assert_se(c1->command_next == NULL);
/* escaped semicolon */
r = config_parse_exec("fake", 5, "section",
"LValue", 0,
"/usr/bin/find \\;",
&c, NULL);
assert_se(r >= 0);
c1 = c1->command_next;
check_execcommand(c1,
"/usr/bin/find", "/usr/bin/find", ";", false);
exec_command_free_list(c);
}