From 78e9bb837c258ac0ec7712b3d612cc2f407e731e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 12 Jun 2024 05:50:42 +0200 Subject: Merging upstream version 256. Signed-off-by: Daniel Baumann --- src/test/test-hostname-util.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'src/test/test-hostname-util.c') diff --git a/src/test/test-hostname-util.c b/src/test/test-hostname-util.c index 77e9a19..a7eccf8 100644 --- a/src/test/test-hostname-util.c +++ b/src/test/test-hostname-util.c @@ -50,27 +50,27 @@ TEST(hostname_cleanup) { char *s; s = strdupa_safe("foobar"); - assert_se(streq(hostname_cleanup(s), "foobar")); + ASSERT_STREQ(hostname_cleanup(s), "foobar"); s = strdupa_safe("foobar.com"); - assert_se(streq(hostname_cleanup(s), "foobar.com")); + ASSERT_STREQ(hostname_cleanup(s), "foobar.com"); s = strdupa_safe("foobar.com."); - assert_se(streq(hostname_cleanup(s), "foobar.com")); + ASSERT_STREQ(hostname_cleanup(s), "foobar.com"); s = strdupa_safe("foo-bar.-com-."); - assert_se(streq(hostname_cleanup(s), "foo-bar.com")); + ASSERT_STREQ(hostname_cleanup(s), "foo-bar.com"); s = strdupa_safe("foo-bar-.-com-."); - assert_se(streq(hostname_cleanup(s), "foo-bar--com")); + ASSERT_STREQ(hostname_cleanup(s), "foo-bar--com"); s = strdupa_safe("--foo-bar.-com"); - assert_se(streq(hostname_cleanup(s), "foo-bar.com")); + ASSERT_STREQ(hostname_cleanup(s), "foo-bar.com"); s = strdupa_safe("fooBAR"); - assert_se(streq(hostname_cleanup(s), "fooBAR")); + ASSERT_STREQ(hostname_cleanup(s), "fooBAR"); s = strdupa_safe("fooBAR.com"); - assert_se(streq(hostname_cleanup(s), "fooBAR.com")); + ASSERT_STREQ(hostname_cleanup(s), "fooBAR.com"); s = strdupa_safe("fooBAR."); - assert_se(streq(hostname_cleanup(s), "fooBAR")); + ASSERT_STREQ(hostname_cleanup(s), "fooBAR"); s = strdupa_safe("fooBAR.com."); - assert_se(streq(hostname_cleanup(s), "fooBAR.com")); + ASSERT_STREQ(hostname_cleanup(s), "fooBAR.com"); s = strdupa_safe("fööbar"); - assert_se(streq(hostname_cleanup(s), "fbar")); + ASSERT_STREQ(hostname_cleanup(s), "fbar"); s = strdupa_safe(""); assert_se(isempty(hostname_cleanup(s))); s = strdupa_safe("."); @@ -78,17 +78,17 @@ TEST(hostname_cleanup) { s = strdupa_safe(".."); assert_se(isempty(hostname_cleanup(s))); s = strdupa_safe("foobar."); - assert_se(streq(hostname_cleanup(s), "foobar")); + ASSERT_STREQ(hostname_cleanup(s), "foobar"); s = strdupa_safe(".foobar"); - assert_se(streq(hostname_cleanup(s), "foobar")); + ASSERT_STREQ(hostname_cleanup(s), "foobar"); s = strdupa_safe("foo..bar"); - assert_se(streq(hostname_cleanup(s), "foo.bar")); + ASSERT_STREQ(hostname_cleanup(s), "foo.bar"); s = strdupa_safe("foo.bar.."); - assert_se(streq(hostname_cleanup(s), "foo.bar")); + ASSERT_STREQ(hostname_cleanup(s), "foo.bar"); s = strdupa_safe("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - assert_se(streq(hostname_cleanup(s), "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")); + ASSERT_STREQ(hostname_cleanup(s), "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); s = strdupa_safe("xxxx........xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); - assert_se(streq(hostname_cleanup(s), "xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx")); + ASSERT_STREQ(hostname_cleanup(s), "xxxx.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"); } TEST(hostname_malloc) { -- cgit v1.2.3