From: Yu Watanabe Date: Tue, 28 Nov 2017 09:13:05 +0000 (+0900) Subject: tests: add tests for empty string X-Git-Tag: v236~100^2~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4e6e06bc795cfd8b96ac8da4ea3b97f9a3ea4a0;p=thirdparty%2Fsystemd.git tests: add tests for empty string --- 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; }