diff options
author | Ivan Kruglov <mail@ikruglov.com> | 2024-04-10 13:19:39 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2024-04-15 08:13:50 +0200 |
commit | c79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a (patch) | |
tree | 88c426bab7e104bc11ff4289e878bb676c083a9a /src/test/test-hostname-setup.c | |
parent | Merge pull request #32266 from yuwata/libsystemd-network-trivial-cleanups (diff) | |
download | systemd-c79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a.tar.xz systemd-c79e88b37d3f8b94cdd2aeba1edbe09d06c08f7a.zip |
ASSERT_STREQ for simple cases
Diffstat (limited to 'src/test/test-hostname-setup.c')
-rw-r--r-- | src/test/test-hostname-setup.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test-hostname-setup.c b/src/test/test-hostname-setup.c index 94e5ece560..2365a5edc1 100644 --- a/src/test/test-hostname-setup.c +++ b/src/test/test-hostname-setup.c @@ -22,28 +22,28 @@ TEST(read_etc_hostname) { /* simple hostname */ assert_se(write_string_file(path, "foo", WRITE_STRING_FILE_CREATE) == 0); assert_se(read_etc_hostname(path, &hostname) == 0); - assert_se(streq(hostname, "foo")); + ASSERT_STREQ(hostname, "foo"); hostname = mfree(hostname); /* with comment */ assert_se(write_string_file(path, "# comment\nfoo", WRITE_STRING_FILE_CREATE) == 0); assert_se(read_etc_hostname(path, &hostname) == 0); assert_se(hostname); - assert_se(streq(hostname, "foo")); + ASSERT_STREQ(hostname, "foo"); hostname = mfree(hostname); /* with comment and extra whitespace */ assert_se(write_string_file(path, "# comment\n\n foo ", WRITE_STRING_FILE_CREATE) == 0); assert_se(read_etc_hostname(path, &hostname) == 0); assert_se(hostname); - assert_se(streq(hostname, "foo")); + ASSERT_STREQ(hostname, "foo"); hostname = mfree(hostname); /* cleans up name */ assert_se(write_string_file(path, "!foo/bar.com", WRITE_STRING_FILE_CREATE) == 0); assert_se(read_etc_hostname(path, &hostname) == 0); assert_se(hostname); - assert_se(streq(hostname, "foobar.com")); + ASSERT_STREQ(hostname, "foobar.com"); hostname = mfree(hostname); /* no value set */ |