[vlc-commits] test/url: add tests for invalid URLs
Filip Roséen
git at videolan.org
Fri Oct 28 19:09:37 CEST 2016
vlc | branch: master | Filip Roséen <filip at atch.se> | Fri Oct 28 10:49:46 2016 +0200| [29b943ba6e9ef6cd6adc6a9a101d3a22825efb9c] | committer: Thomas Guillem
test/url: add tests for invalid URLs
These added checks are there to make sure that common mistakes when
parsing the port-specification of an URL are avoided.
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=29b943ba6e9ef6cd6adc6a9a101d3a22825efb9c
---
src/test/url.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/test/url.c b/src/test/url.c
index 04ce812..de2bf47 100644
--- a/src/test/url.c
+++ b/src/test/url.c
@@ -312,6 +312,11 @@ int main (void)
test_url_parse("p://G a r b a g e", NULL, NULL, NULL, NULL, 0, NULL, NULL);
test_url_parse("p://h/G a r b a g e", NULL, NULL, NULL, NULL, 0, NULL, NULL);
test_url_parse("http://example.com:123xyz", NULL, NULL, NULL, NULL, 0, NULL, NULL);
+ test_url_parse("http://example.com: 123", NULL, NULL, NULL, NULL, 0, NULL, NULL );
+ test_url_parse("http://example.com:+123", NULL, NULL, NULL, NULL, 0, NULL, NULL );
+ test_url_parse("http://example.com:-123", NULL, NULL, NULL, NULL, 0, NULL, NULL );
+ test_url_parse("http://example.com:-4294967298", NULL, NULL, NULL, NULL, 0, NULL, NULL );
+ test_url_parse("http://example.com:-18446744073709551615", NULL, NULL, NULL, NULL, 0, NULL, NULL );
/* Reference test cases for reference URI resolution */
static const char *rfc3986_cases[] =
More information about the vlc-commits
mailing list