path2/test/posix/resolve.js
raw| 1 | 'use strict'; |
| 2 | |
| 3 | var cwd = require('../../posix/_cwd') |
| 4 | , data = [[['/var/lib', '../', 'file/'], '/var/file'], |
| 5 | [['/var/lib', '/../', 'file/'], '/file'], |
| 6 | [['a/b/c/', '../../..'], cwd], |
| 7 | [['.'], cwd], |
| 8 | [['/some/dir', '.', '/absolute/'], '/absolute']]; |
| 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.apply(null, test[0]), test[1], i); |
| 15 | }); |
| 16 | }; |