Skip to content

Commit 3302df7

Browse files
committed
test: update parseOutput.test.ts
1 parent df5b9ab commit 3302df7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/test/git/parseOutput.test.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,19 @@ describe("Split `git diff-index` output into components", function () {
162162
});
163163
});
164164

165+
describe("handle special characters in filenames", function () {
166+
it("should correctly parse a filename with special characters", function () {
167+
const expected: FileChange = {
168+
x: "A",
169+
y: " ",
170+
from: "abcëxyz.md",
171+
to: "",
172+
};
173+
174+
assert.deepStrictEqual(parseDiffIndex("A\tabcëxyz.md"), expected);
175+
});
176+
});
177+
165178
it("should handle a pair of paths correctly", function () {
166179
{
167180
const expected: FileChange = {

0 commit comments

Comments
 (0)