Added path normalization on Windows, along with some tests

This commit is contained in:
Alexander Cerutti
2021-12-28 01:05:14 +01:00
parent 2923eb4d66
commit d0b0f8537f
2 changed files with 20 additions and 2 deletions

View File

@@ -833,6 +833,16 @@ describe("PKPass", () => {
expect(pass[filesSymbol]["en.lproj/pass.string"]).toBeUndefined();
expect(pass[localizationSymbol]["en"]).toBeUndefined();
});
it("should convert Windows paths to single UNIX slash", () => {
if (path.sep === "\\") {
pass.addBuffer("en.lproj\\icon@2x.png", Buffer.alloc(0));
expect(pass[filesSymbol]).toContain({
"en.lproj/icon@2x.png": Buffer.alloc(0),
});
}
});
});
describe("[importMetadataSymbol]", () => {