mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-12 21:05:48 +02:00
Bundle the reverse and keepOriginalHeader flags into a PatchOptions struct
We are going to add one more flag in the next commit. Note that we are not using the struct inside patch_manager.go; we keep passing the individual flags there. The reason for this will become more obvious later in this branch.
This commit is contained in:
parent
5a50bfd179
commit
f76cc27956
4 changed files with 29 additions and 14 deletions
|
@ -513,7 +513,8 @@ func TestModifyPatchForRange(t *testing.T) {
|
|||
for _, s := range scenarios {
|
||||
s := s
|
||||
t.Run(s.testName, func(t *testing.T) {
|
||||
result := ModifiedPatchForRange(nil, s.filename, s.diffText, s.firstLineIndex, s.lastLineIndex, s.reverse, false)
|
||||
result := ModifiedPatchForRange(nil, s.filename, s.diffText, s.firstLineIndex, s.lastLineIndex,
|
||||
PatchOptions{Reverse: s.reverse, KeepOriginalHeader: false})
|
||||
if !assert.Equal(t, s.expected, result) {
|
||||
fmt.Println(result)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue