mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 11:55:23 +03:00
tests: add test from #3979
Let's add one more test that came up during the discussion of an issue. The selected name with 69 chars is above the Linux hostname limit of 64.
This commit is contained in:
parent
b55a6f0812
commit
2c85bbaa53
@ -42,6 +42,7 @@ static void test_hostname_is_valid(void) {
|
||||
assert_se(!hostname_is_valid("foo..bar", false));
|
||||
assert_se(!hostname_is_valid("foo.bar..", false));
|
||||
assert_se(!hostname_is_valid("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", false));
|
||||
assert_se(!hostname_is_valid("au-xph5-rvgrdsb5hcxc-47et3a5vvkrc-server-wyoz4elpdpe3.openstack.local", false));
|
||||
|
||||
assert_se(hostname_is_valid("foobar", true));
|
||||
assert_se(hostname_is_valid("foobar.com", true));
|
||||
|
Loading…
Reference in New Issue
Block a user