summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSamy Pessé <samypesse@gmail.com>2016-02-25 19:15:47 +0100
committerSamy Pessé <samypesse@gmail.com>2016-02-25 19:15:47 +0100
commit80718cc783fae9677dde8bb95cce7db3362db978 (patch)
tree703992775883eda094dff4cb867afd71f436b6fa /test
parent73f22332ec095ec95518d7708cbeeb3db4a88655 (diff)
downloadgitbook-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.js5
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');
});
});
});