From bda491c4138fe7f6c8b2c25ba0ed574a0a5e0c4b Mon Sep 17 00:00:00 2001 From: Klas Lindfors Date: Mon, 13 Jun 2016 10:49:06 +0200 Subject: [PATCH] add tests for empty otp part to check_user_token() --- tests/util_test.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/util_test.c b/tests/util_test.c index f2ab0fc..61899f3 100644 --- a/tests/util_test.c +++ b/tests/util_test.c @@ -92,6 +92,10 @@ static void test_check_user_token(void) { assert(ret == 1); ret = check_user_token(file, "foo2", "vvvvvvvvvvcc", 1); assert(ret == -1); + ret = check_user_token(file, "foo2", "", 1); + assert(ret == -1); + ret = check_user_token(file, "foo", "", 1); + assert(ret == -2); remove(file); }