[vlc-commits] test/url: move test for empty port-specification

Filip Roséen git at videolan.org
Fri Oct 28 19:09:36 CEST 2016


vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Oct 28 10:49:44 2016 +0200| [436b208296d6d07cf346315491ac8321b1d01d8a] | committer: Thomas Guillem

test/url: move test for empty port-specification

According to RFC3986, the port specifier does not have to contain
digits following the colon. This means that "http://example.com:" is a
valid URI, and that the relevant test should not be within the
"Invalid URIs"-group.

Signed-off-by: Thomas Guillem <thomas at gllm.fr>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=436b208296d6d07cf346315491ac8321b1d01d8a
---

 src/test/url.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/url.c b/src/test/url.c
index 2ed99d5..ffb073c 100644
--- a/src/test/url.c
+++ b/src/test/url.c
@@ -268,6 +268,8 @@ int main (void)
                    "/", NULL);
     test_url_parse("http://[2001:db8::1]", "http", NULL, NULL, "2001:db8::1",
                    0, NULL, NULL);
+    test_url_parse("http://example.com:", "http", NULL, NULL, "example.com", 0,
+                    NULL, NULL);
     test_url_parse("protocol://john:doe@1.2.3.4:567", "protocol", "john", "doe", "1.2.3.4", 567, NULL, NULL);
     test_url_parse("http://a.b/?opt=val", "http", NULL, NULL, "a.b", 0, "/", "opt=val");
     test_url_parse("p://u:p@host:123/a/b/c?o=v", "p", "u", "p", "host", 123, "/a/b/c", "o=v");
@@ -300,8 +302,6 @@ int main (void)
     /* Invalid URIs */
     test_url_parse("p://G a r b a g e", "p", NULL, NULL, NULL, 0, NULL, NULL);
     test_url_parse("p://h/G a r b a g e", "p", NULL, NULL, "h", 0, NULL, NULL);
-    test_url_parse("http://example.com:", "http", NULL, NULL, "example.com", 0,
-                    NULL, NULL);
     test_url_parse("http://example.com:123xyz", "http", NULL, NULL,
                    "example.com", 123, NULL, NULL);
 



More information about the vlc-commits mailing list