mirror of
https://github.com/systemd/systemd.git
synced 2025-03-31 14:50:15 +03:00
test-unit-name: check that unexpanded specifiers not valid unit name make
This commit is contained in:
parent
c86ebcf389
commit
642f41a4ec
@ -73,6 +73,12 @@ static void test_unit_name_is_valid(void) {
|
||||
test_unit_name_is_valid_one("user@1000.slice", UNIT_NAME_ANY, true);
|
||||
test_unit_name_is_valid_one("user@1000.slice", UNIT_NAME_INSTANCE, true);
|
||||
test_unit_name_is_valid_one("user@1000.slice", UNIT_NAME_TEMPLATE, false);
|
||||
|
||||
test_unit_name_is_valid_one("foo@%i.service", UNIT_NAME_ANY, false);
|
||||
test_unit_name_is_valid_one("foo@%i.service", UNIT_NAME_INSTANCE, false);
|
||||
test_unit_name_is_valid_one("foo@%%i.service", UNIT_NAME_INSTANCE, false);
|
||||
test_unit_name_is_valid_one("foo@%%i%f.service", UNIT_NAME_INSTANCE, false);
|
||||
test_unit_name_is_valid_one("foo@%F.service", UNIT_NAME_INSTANCE, false);
|
||||
}
|
||||
|
||||
static void test_unit_name_replace_instance_one(const char *pattern, const char *repl, const char *expected, int ret) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user