Isolate all alias commands

This commit is contained in:
Mislav Marohnić 2020-08-11 13:57:48 +02:00
parent 3c55b29446
commit 172ea2b078
14 changed files with 786 additions and 579 deletions

View file

@ -6,7 +6,6 @@ import (
"fmt"
"os/exec"
"regexp"
"testing"
"github.com/cli/cli/internal/run"
)
@ -86,7 +85,13 @@ func createStubbedPrepareCmd(cs *CmdStubber) func(*exec.Cmd) run.Runnable {
}
}
func ExpectLines(t *testing.T, output string, lines ...string) {
type T interface {
Helper()
Errorf(string, ...interface{})
}
func ExpectLines(t T, output string, lines ...string) {
t.Helper()
var r *regexp.Regexp
for _, l := range lines {
r = regexp.MustCompile(l)