(_ context.Context, cmd string, args ...string)
| 24 | } |
| 25 | |
| 26 | func (f *FakeExec) CommandContext(_ context.Context, cmd string, args ...string) xunix.Cmd { |
| 27 | // TODO: This isn't a great key because you may have multiple of the same commands |
| 28 | // but desire different output. |
| 29 | if c, ok := f.Commands[cmdKey(cmd, args...)]; ok { |
| 30 | c.Called = true |
| 31 | return c |
| 32 | } |
| 33 | return f.DefaultFakeCmd |
| 34 | } |
| 35 | |
| 36 | func (f *FakeExec) AddCommands(cmds ...*FakeCmd) { |
| 37 | for _, cmd := range cmds { |