mirror of
https://github.com/bettercap/bettercap
synced 2025-07-13 00:23:49 -07:00
run head in core test with a file that doesn't exist to pass on macOS
On a mac, the /proc file system doesn’t exist. To have this test pass, I’ve written it in a way so that the command will fail like for the ps command which will allow the test to pass on mac and linux.
This commit is contained in:
parent
480f0daa8d
commit
9ee7a504b4
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ func TestCoreExec(t *testing.T) {
|
||||||
{"foo", []string{}, "", `exec: "foo": executable file not found in $PATH`, `ERROR for 'foo []': exec: "foo": executable file not found in $PATH`},
|
{"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"},
|
{"ps", []string{"-someinvalidflag"}, "", "exit status 1", "ERROR for 'ps [-someinvalidflag]': exit status 1"},
|
||||||
{"true", []string{}, "", "", ""},
|
{"true", []string{}, "", "", ""},
|
||||||
{"head", []string{"/proc/self/comm"}, "head", "", ""},
|
{"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"},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, u := range units {
|
for _, u := range units {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue