summaryrefslogtreecommitdiffstats
path: root/src/test/test-open-file.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-25 02:54:52 +0000
commit51fac37bb20c9440a9a4e0a20846c139364d6d13 (patch)
tree77c11a0dffc2c15542689f3a51d12d5076c477e8 /src/test/test-open-file.c
parentAdding upstream version 255.4. (diff)
downloadsystemd-51fac37bb20c9440a9a4e0a20846c139364d6d13.tar.xz
systemd-51fac37bb20c9440a9a4e0a20846c139364d6d13.zip
Adding upstream version 255.5.upstream/255.5
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-open-file.c')
-rw-r--r--src/test/test-open-file.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/test-open-file.c b/src/test/test-open-file.c
index 1b938ec..4314d0d 100644
--- a/src/test/test-open-file.c
+++ b/src/test/test-open-file.c
@@ -172,14 +172,12 @@ TEST(open_file_to_string) {
assert_se(streq(s, "/proc/1/ns/mnt::read-only"));
s = mfree(s);
- assert_se(free_and_strdup(&of->path, "/path:with:colon"));
- assert_se(free_and_strdup(&of->fdname, "path:with:colon"));
+ assert_se(free_and_strdup(&of->path, "/path:with:colon") >= 0);
+ assert_se(free_and_strdup(&of->fdname, "path:with:colon") >= 0);
of->flags = 0;
- r = open_file_to_string(of, &s);
-
- assert_se(r >= 0);
- assert_se(streq(s, "/path\\:with\\:colon"));
+ assert_se(open_file_to_string(of, &s) >= 0);
+ assert_se(streq(s, "/path\\x3awith\\x3acolon"));
}
DEFINE_TEST_MAIN(LOG_INFO);