1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-08-06 22:33:07 +02:00

Add a test case for a deleted file to TestParseAndFormatPlain

Not because it's terribly important to test here (doesn't hurt though), but
because it will be useful in the next commit for a new test we're adding there.
This commit is contained in:
Stefan Haller
2025-07-20 16:23:30 +02:00
parent 16231a150c
commit fc3b725424

View File

@ -115,6 +115,17 @@ index 0000000..4e680cc
+grape +grape
` `
const deletedFile = `diff --git a/newfile b/newfile
deleted file mode 100644
index 4e680cc1f..000000000
--- a/newfile
+++ /dev/null
@@ -1,3 +0,0 @@
-apple
-orange
-grape
`
const addNewlineToPreviouslyEmptyFile = `diff --git a/newfile b/newfile const addNewlineToPreviouslyEmptyFile = `diff --git a/newfile b/newfile
index e69de29..c6568ea 100644 index e69de29..c6568ea 100644
--- a/newfile --- a/newfile
@ -554,6 +565,10 @@ func TestParseAndFormatPlain(t *testing.T) {
testName: "newFile", testName: "newFile",
patchStr: newFile, patchStr: newFile,
}, },
{
testName: "deletedFile",
patchStr: deletedFile,
},
{ {
testName: "addNewlineToPreviouslyEmptyFile", testName: "addNewlineToPreviouslyEmptyFile",
patchStr: addNewlineToPreviouslyEmptyFile, patchStr: addNewlineToPreviouslyEmptyFile,