diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-12 04:46:38 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-12 04:46:38 +0200 |
commit | 8556879e0d14925ce897875c6c264368e2d048c2 (patch) | |
tree | ce02f2378b2eafece807d1d2c53e98ee6b7fd256 /src/test | |
parent | 49a32d43de3bd57bced22ed9a94342ea1efbb31c (diff) |
unit-name: rework unit_name_replace_instance function()
https://bugzilla.redhat.com/show_bug.cgi?id=855863
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-unit-name.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index 392e358ac2..cf434558c3 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -29,6 +29,30 @@ int main(int argc, char* argv[]) { char *t, *k; + t = unit_name_replace_instance("foo@.service", "waldo"); + puts(t); + free(t); + + t = unit_name_replace_instance("foo@xyz.service", "waldo"); + puts(t); + free(t); + + t = unit_name_replace_instance("xyz", "waldo"); + puts(t); + free(t); + + t = unit_name_replace_instance("", "waldo"); + puts(t); + free(t); + + t = unit_name_replace_instance("", ""); + puts(t); + free(t); + + t = unit_name_replace_instance("foo.service", "waldo"); + puts(t); + free(t); + t = unit_name_from_path("/waldo", ".mount"); puts(t); k = unit_name_to_path(t); |