From 348637b28a6253591a5899665d3cde6d8d71d118 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 3 Sep 2015 20:11:58 +0200 Subject: test: add one more test case for parse_pid() --- src/test/test-util.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/test/test-util.c b/src/test/test-util.c index 10d8d210d5..8ceb71f22a 100644 --- a/src/test/test-util.c +++ b/src/test/test-util.c @@ -270,6 +270,9 @@ static void test_parse_pid(void) { r = parse_pid("0xFFFFFFFFFFFFFFFFF", &pid); assert_se(r == -ERANGE); assert_se(pid == 65); + + r = parse_pid("junk", &pid); + assert_se(r == -EINVAL); } static void test_parse_uid(void) { -- cgit v1.2.3-54-g00ecf