From a4e6e06bc795cfd8b96ac8da4ea3b97f9a3ea4a0 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Tue, 28 Nov 2017 18:13:05 +0900 Subject: [PATCH] tests: add tests for empty string --- src/test/test-af-list.c | 1 + src/test/test-arphrd-list.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/test/test-af-list.c b/src/test/test-af-list.c index 69345492871..2d42dc2c54b 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 2949a8aae0e..e5035828209 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; } -- 2.47.3