Browse Source

Add some failing tests for path.join

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
8c0e87f9c3
  1. 4
      test/simple/test-path.js

4
test/simple/test-path.js

@ -39,6 +39,10 @@ assert.equal(path.extname("file."), ".");
assert.equal(path.join(".", "fixtures/b", "..", "/b/c.js"), "fixtures/b/c.js"); assert.equal(path.join(".", "fixtures/b", "..", "/b/c.js"), "fixtures/b/c.js");
assert.equal(path.join("/foo", "../../../bar"), "/bar"); assert.equal(path.join("/foo", "../../../bar"), "/bar");
assert.equal(path.join('./'), '.');
assert.equal(path.join('.'), '.');
assert.equal(path.join('', 'foo'), 'foo');
assert.equal(path.join('foo', '/bar'), 'foo/bar');
assert.equal(path.normalize("./fixtures///b/../b/c.js"), "fixtures/b/c.js"); assert.equal(path.normalize("./fixtures///b/../b/c.js"), "fixtures/b/c.js");
assert.equal(path.normalize("./fixtures///b/../b/c.js",true), "fixtures///b/c.js"); assert.equal(path.normalize("./fixtures///b/../b/c.js",true), "fixtures///b/c.js");

Loading…
Cancel
Save