1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-30 03:23:08 +03:00

update tests

This commit is contained in:
Jesse Duffield
2022-01-03 15:15:26 +11:00
parent 3911575041
commit 95b2e9540a
15 changed files with 92 additions and 124 deletions

View File

@ -6,25 +6,29 @@ import (
// NewDummyOSCommand creates a new dummy OSCommand for testing
func NewDummyOSCommand() *OSCommand {
return NewOSCommand(utils.NewDummyCommon())
osCmd := NewOSCommand(utils.NewDummyCommon(), dummyPlatform)
return osCmd
}
func NewDummyCmdObjBuilder(runner ICmdObjRunner) *CmdObjBuilder {
return &CmdObjBuilder{
runner: runner,
logCmdObj: func(ICmdObj) {},
platform: &Platform{
OS: "darwin",
Shell: "bash",
ShellArg: "-c",
OpenCommand: "open {{filename}}",
OpenLinkCommand: "open {{link}}",
},
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())
osCommand := NewOSCommand(utils.NewDummyCommon(), dummyPlatform)
osCommand.Cmd = NewDummyCmdObjBuilder(runner)
return osCommand