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:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user