You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
586 B
22 lines
586 B
var assert = require("assert");
|
|
|
|
var zipfile = require("../../lib/docx/uris");
|
|
var test = require("../test")(module);
|
|
|
|
|
|
test("uriToZipEntryName", {
|
|
"when path does not have leading slash then path is resolved relative to base": function() {
|
|
assert.equal(
|
|
zipfile.uriToZipEntryName("one/two", "three/four"),
|
|
"one/two/three/four"
|
|
);
|
|
},
|
|
|
|
"when path has leading slash then base is ignored": function() {
|
|
assert.equal(
|
|
zipfile.uriToZipEntryName("one/two", "/three/four"),
|
|
"three/four"
|
|
);
|
|
}
|
|
});
|
|
|
|
|