aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2015-09-06 17:35:10 +0100
committerMichael Williamson <mike@zwobble.org>2015-09-06 17:35:10 +0100
commitcccaa16098484a7d9df26c18c0b6aa5b9defbeb5 (patch)
tree2df9fc9050639651315d29ec24b2b65f9ed55d07 /tests
parente16404b95f86cd0d938f1f9ebc4bacd7a5aa7042 (diff)
Extract uriToPath
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/files.tests.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/docx/files.tests.js b/tests/docx/files.tests.js
index d3f3391..fecc6eb 100644
--- a/tests/docx/files.tests.js
+++ b/tests/docx/files.tests.js
@@ -4,6 +4,7 @@ var assert = require("assert");
var promises = require("../../lib/promises");
var Files = require("../../lib/docx/files").Files;
+var uriToPath = require("../../lib/docx/files").uriToPath;
var testing = require("../testing");
var test = testing.test;
@@ -22,3 +23,10 @@ describe("Files", function() {
});
});
});
+
+
+describe("uriToPath", function() {
+ test("leading slash is retained on non-Windows file URIs", function() {
+ assert.equal(uriToPath("file:///a/b/c"), "/a/b/c");
+ });
+});