diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/docx/files.tests.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/docx/files.tests.js b/tests/docx/files.tests.js index 0221834..e37df6b 100644 --- a/tests/docx/files.tests.js +++ b/tests/docx/files.tests.js @@ -22,6 +22,16 @@ describe("Files", function() { }); }); }); + + test("can open files with relative URI", function() { + var filePath = path.resolve(testing.testPath("tiny-picture.png")); + var files = new Files(testing.testPath(".")); + return files.read("tiny-picture.png", "base64").then(function(contents) { + return readFile(filePath, "base64").then(function(expectedContents) { + assert.deepEqual(contents, expectedContents); + }); + }); + }); }); @@ -51,4 +61,8 @@ describe("uriToPath", function() { assert.equal(uriToPath("file:///c:/a", "win32"), "c:/a"); assert.equal(uriToPath("file:///C:/a", "win32"), "C:/a"); }); + + test("relative URI is unquoted", function() { + assert.equal(uriToPath("a%20b/c"), "a b/c"); + }); }); |
