path2/test/posix/relative.js
raw| 1 | 'use strict'; |
| 2 | |
| 3 | var data = [['/var/lib', '/var', '..'], |
| 4 | ['/var/lib', '/bin', '../../bin'], |
| 5 | ['/var/lib', '/var/lib', ''], |
| 6 | ['/var/lib', '/var/apache', '../apache'], |
| 7 | ['/var/', '/var/lib', 'lib'], |
| 8 | ['/', '/var/lib', 'var/lib']]; |
| 9 | |
| 10 | module.exports = exports = function (t, a) { exports.tests(t, a); }; |
| 11 | |
| 12 | exports.tests = function (t, a) { |
| 13 | data.forEach(function (test, i) { |
| 14 | a(t(test[0], test[1]), test[2], i); |
| 15 | }); |
| 16 | }; |