1 var router = require("../lib/router.js");
3 global.repoproxy = new Object();
4 global.repoproxy.cacheDir = "./cache";
6 var paths = new Array();
8 paths[0] ="/pub/something/";
9 paths[1] ="/pub/something";
10 paths[2] ="/pub/fedora";
11 paths[3] ="/pub/fedora/";
12 paths[4] ="/pub/ts.js";
15 paths[7] = "/fedora/";
17 paths[9] = "/fedora/some/directory/in/here/";
18 paths[10] = "/fedora/some/directory/in/here/file";
22 function trial(path) {
24 console.log("\n\n\n\n\nBEGIN TEST on '%s'", path);
26 var req = new Object();
27 var res = new Object();
30 res.writeHead = function(n, o) {
31 console.log("write head for: ", n);
32 console.log("and o: ",o);
35 res.end = function() {
39 var result = router.unifyRequest(req, res, function(uni) {
40 console.log("I is ", i);
41 console.log("Uni is ", uni);
42 console.log("from path: ", path);
46 if(typeof paths[i] != "undefined") trial(paths[i]);