[vlc-devel] commit: Test cases for make_path() ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Jan 30 17:38:27 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Jan 30 18:34:06 2010 +0200| [3348a3879bfc80800746c7d4c4b5fea8111b48a5] | committer: Rémi Denis-Courmont 

Test cases for make_path()

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

 src/test/url.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/test/url.c b/src/test/url.c
index f4b6651..f5df985 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 at 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;
 }




More information about the vlc-devel mailing list