From: RĂ©mi Denis-Courmont Date: Sat, 30 Jan 2010 16:34:06 +0000 (+0200) Subject: Test cases for make_path() X-Git-Tag: 1.1.0-ff~659 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=3348a3879bfc80800746c7d4c4b5fea8111b48a5;p=vlc Test cases for make_path() --- diff --git a/src/test/url.c b/src/test/url.c index f4b665138d..f5df985fab 100644 --- a/src/test/url.c +++ b/src/test/url.c @@ -144,5 +144,19 @@ int main (void) /*val = fchdir (fd); assert (val != -1);*/ + /* URI to path tests */ +#define test( a, b ) test (make_path, a, b) + test ("mailto:john@example.com", NULL); + test ("http://www.example.com/file.html#ref", NULL); + test ("file://", NULL); + test ("file:///", "/"); + test ("file://localhost/home/john/music%2Eogg", "/home/john/music.ogg"); + test ("file://localhost/home/john/text#ref", "/home/john/text"); + test ("fd://0foobar", NULL); + test ("fd://0#ref", "/dev/stdin"); + test ("fd://1", "/dev/stdout"); + test ("fd://12345", "/dev/fd/12345"); +#undef test + return 0; }