Skip to content

Commit 3fbc83c

Browse files
committed
added test for 438
1 parent 9c37fa8 commit 3fbc83c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/mocha.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,16 @@ describe("adm-zip", () => {
218218
fs.unlinkSync("./text.txt");
219219
});
220220

221+
it("passes issue-438-AddFile with windows path sepator", () => {
222+
const zip = new Zip();
223+
zip.addFile("foo\\bar.txt", "test", "test");
224+
zip.extractAllTo(destination);
225+
226+
const files = walk(destination);
227+
228+
expect(files.sort()).to.deep.equal([pth.normalize("./test/xxx/foo/bar.txt")].sort());
229+
});
230+
221231
it("testing noSort option", () => {
222232
const content = "test";
223233
const comment = "comment";

0 commit comments

Comments
 (0)