Open tolmasky opened 15 years ago
I think we should match the behavior of other languages here. Here's Ruby's, what are the equivalents in other languages?
>> Pathname("a/b/c").relative_path_from(Pathname("a"))
=> #<Pathname:b/c>
>> Pathname("a/b/c").relative_path_from(Pathname("a/"))
=> #<Pathname:b/c>
added initial tests for file.relative()
http://github.com/cloudwork/narwhal/commit/2d88ca05102bce9cbd55602492d0bd72005cdee7
moved test cases to commonjs/file/relative.js
http://github.com/cloudwork/narwhal/commit/49a6680c89a27d90637c86153ec9e7b5d3312666
FILE.relative("a", "a/b/c") => a/b/c FILE.relative("a/", "a/b/c") => b/c (correct)