diff options
Diffstat (limited to 'test/integration/staginWithDiffContextChange/files/one_new.txt')
-rw-r--r-- | test/integration/staginWithDiffContextChange/files/one_new.txt | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/test/integration/staginWithDiffContextChange/files/one_new.txt b/test/integration/staginWithDiffContextChange/files/one_new.txt deleted file mode 100644 index c3323cfc9..000000000 --- a/test/integration/staginWithDiffContextChange/files/one_new.txt +++ /dev/null @@ -1,67 +0,0 @@ -package oscommands - -import ( - "github.com/jesseduffield/lazygit/pkg/common" - "github.com/jesseduffield/lazygit/pkg/utils" -) - -// NewDummyOSCommand creates a new dummy OSCommand for testing -func NewDummyOSCommand() *OSCommand { - osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - - return osCmd -} - -type OSCommandDeps struct { - Common *common.Common - Platform *Platform - GetenvFn func(string) string - RemoveFileFn func(string) error - Cmd *CmdObjBuilder -} - -func NewDummyOSCommandWithDeps(deps OSCommandDeps) *OSCommand { - if deps.Cmd == nil { - panic("WHAT") - } - common := deps.Common - if common == nil { - common = utils.NewDummyCommon() - } - - platform := deps.Platform - if platform == nil { - platform = dummyPlatform - } - - return &OSCommand{ - Common: common, - Platform: platform, - getenvFn: deps.GetenvFn, - removeFileFn: deps.RemoveFileFn, - guiIO: NewNullGuiIO(utils.NewDummyLog()), - Cmd: deps.Cmd, - } -} - -func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder { - return &CmdObjBuilder{ - runner: runner, - platform: dummyPlatform, - } -} - -var dummyPlatform = &Platform{ - OS: "darwin", - Shell: "bash", - ShellArg: "-c", - OpenCommand: "open {{filename}}", - OpenLinkCommand: "open {{link}}", -} - -func NewDummyOSCommandWithRunner(runner *FakeCmdObjRunner) *OSCommand { - osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform, NewNullGuiIO(utils.NewDummyLog())) - osCommand.Cmd = NewDummyCmdObjBuilder(runner) - - return osCommand -} |