+ test_b64 ("f", "Zg==");
+ test_b64 ("fo", "Zm8=");
+ test_b64 ("foo", "Zm9v");
+ test_b64 ("foob", "Zm9vYg==");
+ test_b64 ("fooba", "Zm9vYmE=");
+ test_b64 ("foobar", "Zm9vYmFy");
+
+ /* Path test */
+ test_path ("file:///", "file:///");
+ test_path ("http://www.example.com/%7Ejohn/",
+ "http://www.example.com/%7Ejohn/");
+ test_path ("/", "file:///");
+ test_path ("/home/john/", "file:///home/john/");
+ test_path ("/home/john/music.ogg", "file:///home/john/music.ogg");
+ test_path ("\\\\server/pub/music.ogg", "smb://server/pub/music.ogg");
+ test_path ("\\\\server\\pub\\music.ogg", "smb://server/pub/music.ogg");
+ test_path ("\\\\server", "smb://server");
+
+ /*int fd = open (".", O_RDONLY);
+ assert (fd != -1);*/
+ val = chdir ("/tmp");
+ assert (val != -1);
+
+ char buf[256];
+ char * tmpdir;
+ tmpdir = getcwd(buf, sizeof(buf)/sizeof(*buf));
+ assert (tmpdir);
+
+ test_current_directory_path ("movie.ogg", tmpdir, "movie.ogg");
+ test_current_directory_path (".", tmpdir, ".");
+ test_current_directory_path ("", tmpdir, "");
+
+ /*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