test: extend unit-name test a bit

This commit is contained in:
Lennart Poettering 2012-09-12 08:31:08 +02:00
parent d18dff430b
commit 1b2ac6b311
1 changed files with 20 additions and 0 deletions

View File

@ -53,6 +53,26 @@ int main(int argc, char* argv[]) {
puts(t);
free(t);
t = unit_name_replace_instance(".service", "waldo");
puts(t);
free(t);
t = unit_name_replace_instance("foo@bar", "waldo");
puts(t);
free(t);
t = unit_name_replace_instance("foo@", "waldo");
puts(t);
free(t);
t = unit_name_replace_instance("@", "waldo");
puts(t);
free(t);
t = unit_name_replace_instance("@bar", "waldo");
puts(t);
free(t);
t = unit_name_from_path("/waldo", ".mount");
puts(t);
k = unit_name_to_path(t);