summaryrefslogtreecommitdiffstats
path: root/src/test/test-ellipsize.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:40 +0000
commitfc53809803cd2bc2434e312b19a18fa36776da12 (patch)
treeb4b43bd6538f51965ce32856e9c053d0f90919c8 /src/test/test-ellipsize.c
parentAdding upstream version 255.5. (diff)
downloadsystemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz
systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-ellipsize.c')
-rw-r--r--src/test/test-ellipsize.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/test-ellipsize.c b/src/test/test-ellipsize.c
index c272c56..f181476 100644
--- a/src/test/test-ellipsize.c
+++ b/src/test/test-ellipsize.c
@@ -57,9 +57,9 @@ static void test_ellipsize_mem_one(const char *s, size_t old_length, size_t new_
assert_se(utf8_console_width(t3) <= max_width);
if (new_length >= old_length) {
- assert_se(streq(t1, n));
- assert_se(streq(t2, n));
- assert_se(streq(t3, n));
+ ASSERT_STREQ(t1, n);
+ ASSERT_STREQ(t2, n);
+ ASSERT_STREQ(t3, n);
}
}
@@ -143,17 +143,17 @@ TEST(ellipsize_ansi_cats) {
e = ellipsize("01" ANSI_NORMAL "23", 4, 0);
puts(e);
- assert_se(streq(e, "01" ANSI_NORMAL "23"));
+ ASSERT_STREQ(e, "01" ANSI_NORMAL "23");
f = ellipsize("ab" ANSI_NORMAL "cd", 4, 90);
puts(f);
- assert_se(streq(f, "ab" ANSI_NORMAL "cd"));
+ ASSERT_STREQ(f, "ab" ANSI_NORMAL "cd");
g = ellipsize("🐱🐱" ANSI_NORMAL "🐱🐱" ANSI_NORMAL, 5, 0);
puts(g);
- assert_se(streq(g, "…" ANSI_NORMAL "🐱🐱" ANSI_NORMAL));
+ ASSERT_STREQ(g, "…" ANSI_NORMAL "🐱🐱" ANSI_NORMAL);
h = ellipsize("🐱🐱" ANSI_NORMAL "🐱🐱" ANSI_NORMAL, 5, 90);
puts(h);
- assert_se(streq(h, "🐱…" ANSI_NORMAL "🐱" ANSI_NORMAL));
+ ASSERT_STREQ(h, "🐱…" ANSI_NORMAL "🐱" ANSI_NORMAL);
}
DEFINE_TEST_MAIN(LOG_INFO);