1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-28 20:25:25 +03:00

tests: add tests for empty string

This commit is contained in:
Yu Watanabe 2017-11-28 18:13:05 +09:00
parent d40c54fe56
commit a4e6e06bc7
2 changed files with 2 additions and 0 deletions

View File

@ -46,6 +46,7 @@ int main(int argc, const char *argv[]) {
assert_se(af_to_name(af_max()) == NULL);
assert_se(af_to_name(-1) == NULL);
assert_se(af_from_name("huddlduddl") == AF_UNSPEC);
assert_se(af_from_name("") == AF_UNSPEC);
return 0;
}

View File

@ -46,6 +46,7 @@ int main(int argc, const char *argv[]) {
assert_se(arphrd_to_name(arphrd_max()) == NULL);
assert_se(arphrd_to_name(0) == NULL);
assert_se(arphrd_from_name("huddlduddl") == 0);
assert_se(arphrd_from_name("") == 0);
return 0;
}