test: add test-cases for posix path.relative()

adds posix test cases for paths similar to those that caused #5447

PR-URL: https://github.com/nodejs/node/pull/5456
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Roman Reiss <me@silverwind.io>
pull/5456/merge
Owen Smith 2016-02-26 15:58:08 -05:00 committed by Roman Reiss
parent e326950498
commit 7fc6645982
1 changed files with 3 additions and 1 deletions

View File

@ -488,7 +488,9 @@ const relativeTests = [
['/var/', '/var/lib', 'lib'], ['/var/', '/var/lib', 'lib'],
['/', '/var/lib', 'var/lib'], ['/', '/var/lib', 'var/lib'],
['/foo/test', '/foo/test/bar/package.json', 'bar/package.json'], ['/foo/test', '/foo/test/bar/package.json', 'bar/package.json'],
['/Users/a/web/b/test/mails', '/Users/a/web/b', '../..'] ['/Users/a/web/b/test/mails', '/Users/a/web/b', '../..'],
['/foo/bar/baz-quux', '/foo/bar/baz', '../baz'],
['/foo/bar/baz', '/foo/bar/baz-quux', '../baz-quux']
] ]
] ]
]; ];