diff options
author | Felipe Sateler <fsateler@users.noreply.github.com> | 2017-09-14 14:51:20 -0300 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-09-14 19:51:19 +0200 |
commit | 038492aed3e0293fd9cf4998fd891addb597b954 (patch) | |
tree | fb5b8d7eb7c445850e10d666185f549ffa4a64c2 /src/test/test-unit-name.c | |
parent | 8b5c528ce8823b723178e9ebb552e19b83fbc7a9 (diff) | |
download | systemd-038492aed3e0293fd9cf4998fd891addb597b954.tar.gz |
shared: end string with % if one was found at the end of a expandible string (#6828)
Current behavior is that %X where X is an unidentified specifier, then the result is
the same %X string. This was not the case when the string ended with a stray %, where
the character would have not been output. Lets add that missing character.
Fixes: #6374
Diffstat (limited to 'src/test/test-unit-name.c')
-rw-r--r-- | src/test/test-unit-name.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c index b8979c0e95..dcccc9080c 100644 --- a/src/test/test-unit-name.c +++ b/src/test/test-unit-name.c @@ -237,7 +237,8 @@ static int test_unit_printf(void) { /* general tests */ expect(u, "%%", "%"); expect(u, "%%s", "%s"); - expect(u, "%", ""); // REALLY? + expect(u, "%,", "%,"); + expect(u, "%", "%"); /* normal unit */ expect(u, "%n", "blah.service"); |