diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:42 +0000 |
commit | 78e9bb837c258ac0ec7712b3d612cc2f407e731e (patch) | |
tree | f515d16b6efd858a9aeb5b0ef5d6f90bf288283d /src/test/test-hostname-util.c | |
parent | Adding debian version 255.5-1. (diff) | |
download | systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.tar.xz systemd-78e9bb837c258ac0ec7712b3d612cc2f407e731e.zip |
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/test-hostname-util.c')
-rw-r--r-- | src/test/test-hostname-util.c | 34 |
1 files changed, 17 insertions, 17 deletions
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) { |