diff options
author | Samy Pessé <samypesse@gmail.com> | 2016-02-25 19:15:47 +0100 |
---|---|---|
committer | Samy Pessé <samypesse@gmail.com> | 2016-02-25 19:15:47 +0100 |
commit | 80718cc783fae9677dde8bb95cce7db3362db978 (patch) | |
tree | 703992775883eda094dff4cb867afd71f436b6fa /test | |
parent | 73f22332ec095ec95518d7708cbeeb3db4a88655 (diff) | |
download | gitbook-80718cc783fae9677dde8bb95cce7db3362db978.zip gitbook-80718cc783fae9677dde8bb95cce7db3362db978.tar.gz gitbook-80718cc783fae9677dde8bb95cce7db3362db978.tar.bz2 |
Fix some path normalization on windows
Diffstat (limited to 'test')
-rw-r--r-- | test/location.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/location.js b/test/location.js index 2f209e0..3e2294e 100644 --- a/test/location.js +++ b/test/location.js @@ -45,6 +45,11 @@ describe('Location', function() { location.toAbsolute('/test.md', './', './').should.be.equal('test.md'); location.toAbsolute('/test.md', 'test', 'test').should.be.equal('../test.md'); location.toAbsolute('/sub/test.md', 'test', 'test').should.be.equal('../sub/test.md'); + location.toAbsolute('/test.png', 'folder', '').should.be.equal('test.png'); + }); + + it('should correctly handle absolute path (windows)', function() { + location.toAbsolute('\\test.png', 'folder', '').should.be.equal('test.png'); }); }); }); |