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:
@ -115,6 +115,17 @@ index 0000000..4e680cc
|
||||
+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
|
||||
index e69de29..c6568ea 100644
|
||||
--- a/newfile
|
||||
@ -554,6 +565,10 @@ func TestParseAndFormatPlain(t *testing.T) {
|
||||
testName: "newFile",
|
||||
patchStr: newFile,
|
||||
},
|
||||
{
|
||||
testName: "deletedFile",
|
||||
patchStr: deletedFile,
|
||||
},
|
||||
{
|
||||
testName: "addNewlineToPreviouslyEmptyFile",
|
||||
patchStr: addNewlineToPreviouslyEmptyFile,
|
||||
|
Reference in New Issue
Block a user