From 3302df7291efbd36978abdb83a8884cc2e537e6f Mon Sep 17 00:00:00 2001 From: Michael Currin <18750745+MichaelCurrin@users.noreply.github.com> Date: Mon, 19 Aug 2024 15:37:58 +0200 Subject: [PATCH] test: update parseOutput.test.ts --- src/test/git/parseOutput.test.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/git/parseOutput.test.ts b/src/test/git/parseOutput.test.ts index 9e35163..436d310 100644 --- a/src/test/git/parseOutput.test.ts +++ b/src/test/git/parseOutput.test.ts @@ -162,6 +162,19 @@ describe("Split `git diff-index` output into components", function () { }); }); + describe("handle special characters in filenames", function () { + it("should correctly parse a filename with special characters", function () { + const expected: FileChange = { + x: "A", + y: " ", + from: "abcëxyz.md", + to: "", + }; + + assert.deepStrictEqual(parseDiffIndex("A\tabcëxyz.md"), expected); + }); + }); + it("should handle a pair of paths correctly", function () { { const expected: FileChange = {