diff options
author | Lennart Poettering <lennart@poettering.net> | 2014-11-05 19:43:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2014-11-05 19:46:07 +0100 |
commit | 07318c290884824dd19f41beefb46aeaaabab46c (patch) | |
tree | 85b3e86f84668859b1f18bba0d757f8a9dd32ba8 /src/test | |
parent | d5ce1cfce46b9cf4e990acdcbae367785a56ed5e (diff) |
condition: rewrite condition_test_kernel_command_line() based on unquote_first_word()
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-condition-util.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/test/test-condition-util.c b/src/test/test-condition-util.c index 35ee9167bf..1c792446af 100644 --- a/src/test/test-condition-util.c +++ b/src/test/test-condition-util.c @@ -95,6 +95,18 @@ static void test_condition_test_architecture(void) { condition_free(condition); } +static void test_condition_test_kernel_command_line(void) { + Condition *condition; + + condition = condition_new(CONDITION_KERNEL_COMMAND_LINE, "thisreallyshouldntbeonthekernelcommandline", false, false); + assert_se(!condition_test_kernel_command_line(condition)); + condition_free(condition); + + condition = condition_new(CONDITION_KERNEL_COMMAND_LINE, "andthis=neither", false, false); + assert_se(!condition_test_kernel_command_line(condition)); + condition_free(condition); +} + int main(int argc, char *argv[]) { log_parse_environment(); log_open(); @@ -102,6 +114,7 @@ int main(int argc, char *argv[]) { test_condition_test_ac_power(); test_condition_test_host(); test_condition_test_architecture(); + test_condition_test_kernel_command_line(); return 0; } |