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:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:45 +0000
commitefeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch)
treec0b83368f18be983fcc763200c4c24d633244588 /src/test/test-ellipsize.c
parentReleasing progress-linux version 255.5-1~progress7.99u1. (diff)
downloadsystemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz
systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip
Merging upstream version 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);