mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
Merge branch 'master' of git://github.com/rumpelsepp/bettercap into rumpelsepp-master
This commit is contained in:
commit
b8ff8a00e8
1376 changed files with 386 additions and 458140 deletions
|
@ -101,10 +101,10 @@ func TestCoreExec(t *testing.T) {
|
|||
err string
|
||||
stdout string
|
||||
}{
|
||||
{"foo", []string{}, "", `exec: "foo": executable file not found in $PATH`, `ERROR for 'foo []': exec: "foo": executable file not found in $PATH`},
|
||||
{"ps", []string{"-someinvalidflag"}, "", "exit status 1", "ERROR for 'ps [-someinvalidflag]': exit status 1"},
|
||||
{"foo", []string{}, "", `exec: "foo": executable file not found in $PATH`, ""},
|
||||
{"ps", []string{"-someinvalidflag"}, "", "exit status 1", ""},
|
||||
{"true", []string{}, "", "", ""},
|
||||
{"head", []string{"/path/to/file/that/does/not/exist"}, "", "exit status 1", "ERROR for 'head [/path/to/file/that/does/not/exist]': exit status 1"},
|
||||
{"head", []string{"/path/to/file/that/does/not/exist"}, "", "exit status 1", ""},
|
||||
}
|
||||
|
||||
for _, u := range units {
|
||||
|
@ -114,7 +114,7 @@ func TestCoreExec(t *testing.T) {
|
|||
r, w, _ := os.Pipe()
|
||||
os.Stdout = w
|
||||
|
||||
gotOut, gotErr := ExecSilent(u.exec, u.args)
|
||||
gotOut, gotErr := Exec(u.exec, u.args)
|
||||
w.Close()
|
||||
io.Copy(&buf, r)
|
||||
os.Stdout = oldStdout
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue