--- /dev/null
+var router = require("../lib/router.js");
+
+global.repoproxy = new Object();
+global.repoproxy.cacheDir = "./cache";
+
+var paths = new Array();
+var i = 0;
+paths[0] ="/pub/something/";
+paths[1] ="/pub/something";
+paths[2] ="/pub/fedora";
+paths[3] ="/pub/fedora/";
+paths[4] ="/pub/ts.js";
+paths[5] ="/ts.js";
+paths[6] ="/fedora";
+paths[7] = "/fedora/";
+paths[8] = "/";
+paths[9] = "/fedora/some/directory/in/here/";
+paths[10] = "/fedora/some/directory/in/here/file";
+
+trial(paths[i]);
+
+function trial(path) {
+
+ console.log("\n\n\n\n\nBEGIN TEST on '%s'", path);
+
+ var req = new Object();
+ var res = new Object();
+ req.url = path;
+
+ res.writeHead = function(n, o) {
+ console.log("write head for: ", n);
+ console.log("and o: ",o);
+ }
+
+ res.end = function() {
+ return;
+ }
+
+ var result = router.unifyRequest(req, res, function(uni) {
+ console.log("I is ", i);
+ console.log("Uni is ", uni);
+ console.log("from path: ", path);
+
+ i++;
+
+ if(typeof paths[i] != "undefined") trial(paths[i]);
+ }, true);
+}
+