diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-11-28 18:13:05 +0900 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2017-11-28 20:21:25 +0900 |
commit | a4e6e06bc795cfd8b96ac8da4ea3b97f9a3ea4a0 (patch) | |
tree | 474c2e879d1a4c428efcef0c866741f641c7c85f | |
parent | d40c54fe56db52857890ebbf9d8c9ffe82b8b66c (diff) | |
download | systemd-a4e6e06bc795cfd8b96ac8da4ea3b97f9a3ea4a0.tar.gz |
tests: add tests for empty string
-rw-r--r-- | src/test/test-af-list.c | 1 | ||||
-rw-r--r-- | src/test/test-arphrd-list.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c index 6934549287..2d42dc2c54 100644 --- a/src/test/test-af-list.c +++ b/src/test/test-af-list.c @@ -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; } diff --git a/src/test/test-arphrd-list.c b/src/test/test-arphrd-list.c index 2949a8aae0..e503582820 100644 --- a/src/test/test-arphrd-list.c +++ b/src/test/test-arphrd-list.c @@ -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; } |