From 6ef29d9b532dbb6666072ad52684123d5087a14b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cenk=20G=C3=BCndo=C4=9Fan?= Date: Thu, 4 Feb 2021 16:20:01 +0100 Subject: [PATCH] tests: uri_parser: new test to check empty host --- .../tests-uri_parser/tests-uri_parser.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/tests/unittests/tests-uri_parser/tests-uri_parser.c b/tests/unittests/tests-uri_parser/tests-uri_parser.c index 73772aba10..af108e0c77 100644 --- a/tests/unittests/tests-uri_parser/tests-uri_parser.c +++ b/tests/unittests/tests-uri_parser/tests-uri_parser.c @@ -216,15 +216,15 @@ static const validate_t validate_uris[] = { 0), VEC("coap://R@////////////////7///v=1", true, + "coap", + "R", "", "", "", "", + "////////////////7///v=1", "", - "", - "", - "", - -1), + 0), VEC("coa[:////[2001:db5ow:5own/Ov=1", false, "", @@ -412,6 +412,17 @@ static const validate_t validate_uris[] = { "", "", 0), + VEC("A://@", + true, + "A", + "", + "", + "", + "", + "", + "", + "", + 0), }; static char _failure_msg[VEC_MSG_LEN];