summaryrefslogtreecommitdiff
path: root/src/test/test-unit-file.c
diff options
context:
space:
mode:
authorOleksii Shevchuk <alxchk@gmail.com>2012-11-03 21:52:02 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2012-11-15 16:01:10 +0100
commit7e1a84f55244ca78093b1dabc58683bc0e7f4304 (patch)
tree03eeff2c5547f8188bc3309e704881e836fbcc63 /src/test/test-unit-file.c
parent2c5417ade0d137f811e4fcc1b099f963e6d5a820 (diff)
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 \;
Diffstat (limited to 'src/test/test-unit-file.c')
-rw-r--r--src/test/test-unit-file.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/test/test-unit-file.c b/src/test/test-unit-file.c
index bb5cbdf9d7..bca8a69b78 100644
--- a/src/test/test-unit-file.c
+++ b/src/test/test-unit-file.c
@@ -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);
}