1 Tests FileSystemMapping
3 Testing file system mapping.
6 Adding file system /home/username/projects/foo
7 Testing file system mapping.
9 - /home/username/projects/foo
11 Adding file system /home/username/projects/bar
12 Testing file system mapping.
14 - /home/username/projects/foo
15 - /home/username/projects/bar
17 Adding file system /www/site1
18 Testing file system mapping.
20 - /home/username/projects/foo
21 - /home/username/projects/bar
24 Adding file mapping (/www/site1, http://localhost/, /)
25 Testing file system mapping.
27 - /home/username/projects/foo
28 - /home/username/projects/bar
30 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
32 Adding file mapping (/www/site1, http://www.foo.com/, /foo/)
33 Testing file system mapping.
35 - /home/username/projects/foo
36 - /home/username/projects/bar
38 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
39 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
41 Adding file mapping (/home/username/projects/foo, http://www.example.com/bar/, /foo/)
42 Testing file system mapping.
44 - /home/username/projects/foo
45 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
46 - /home/username/projects/bar
48 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
49 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
51 Adding file mapping for resource (http://www.bar.com/foo/folder/42.js, /home/username/projects/foo, baz/folder/42.js)
52 Testing file system mapping.
54 - /home/username/projects/foo
55 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
56 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/"}
57 - /home/username/projects/bar
59 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
60 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
62 Testing mappings for url:
63 Has mapping for 'http://www.bar.com/foo/folder/42.js': true
64 File for 'http://www.bar.com/foo/folder/42.js': /home/username/projects/foo / baz/folder/42.js
65 Has mapping for 'http://www.foo.com/bar/folder/42.js': true
66 File for 'http://www.foo.com/bar/folder/42.js': /www/site1 / foo/bar/folder/42.js
67 Has mapping for 'http://localhost/index.html': true
68 File for 'http://localhost/index.html': /www/site1 / index.html
69 Has mapping for 'https://localhost/index.html': false
70 File for 'https://localhost/index.html': null
71 Has mapping for 'http://localhost:8080/index.html': false
72 File for 'http://localhost:8080/index.html': null
73 Has mapping for 'http://localhost/': true
74 File for 'http://localhost/': /www/site1 /
76 Testing mappings for path:
77 URL for path '/home/username/projects/foo / baz/folder/42.js': http://www.bar.com/foo/folder/42.js
78 URL for path '/home/username/projects/foo / baz/folder/43.js': http://www.bar.com/foo/folder/43.js
79 URL for path '/home/username/projects/foo / bar/folder/42.js':
80 URL for path '/home/username/projects/foo / foo/folder/42.js': http://www.example.com/bar/folder/42.js
81 URL for path '/home/username/projects/foo / foo2/folder/42.js':
82 URL for path '/www/site1 / foo/index.html': http://www.foo.com/index.html
83 URL for path '/www/site1 / index.html': http://localhost/index.html
84 URL for path '/www/site1 / foo': http://localhost/foo
85 URL for path '/www/site1 / foo/': http://www.foo.com/
87 Creating another file system mapping.
88 Testing file system mapping.
90 - /home/username/projects/foo
91 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
92 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.bar.com/foo/","pathPrefix":"/baz/"}
93 - /home/username/projects/bar
95 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
96 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
98 Removing file mapping for url http://www.bar.com/foo/folder/42.js
99 Testing file system mapping.
101 - /home/username/projects/foo
102 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
103 - /home/username/projects/bar
105 - {"fileSystemPath":"/www/site1","urlPrefix":"http://localhost/","pathPrefix":"/"}
106 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
108 Removing file mapping (/www/site1, http://localhost/, /)
109 Testing file system mapping.
111 - /home/username/projects/foo
112 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
113 - /home/username/projects/bar
115 - {"fileSystemPath":"/www/site1","urlPrefix":"http://www.foo.com/","pathPrefix":"/foo/"}
117 Removing file mapping (/www/site1, http://www.foo.com/, /foo/)
118 Testing file system mapping.
120 - /home/username/projects/foo
121 - {"fileSystemPath":"/home/username/projects/foo","urlPrefix":"http://www.example.com/bar/","pathPrefix":"/foo/"}
122 - /home/username/projects/bar
125 Removing file mapping (/home/username/projects/foo, http://www.example.com/bar/, /foo/)
126 Testing file system mapping.
128 - /home/username/projects/foo
129 - /home/username/projects/bar
132 Removing file system /www/site1
133 Testing file system mapping.
135 - /home/username/projects/foo
136 - /home/username/projects/bar
138 Removing file system /home/username/projects/foo
139 Testing file system mapping.
141 - /home/username/projects/bar
143 Removing file system /home/username/projects/bar
144 Testing file system mapping.