Fix the exec test, on os x false and true have different paths, but they're in $PATH on all.

This commit is contained in:
Brendan Burns 2014-10-07 13:26:25 -07:00
parent 3cc2aa8f76
commit 5bdb061f14

View File

@ -23,7 +23,7 @@ import (
func TestExecutorNoArgs(t *testing.T) { func TestExecutorNoArgs(t *testing.T) {
ex := New() ex := New()
cmd := ex.Command("/bin/true") cmd := ex.Command("true")
out, err := cmd.CombinedOutput() out, err := cmd.CombinedOutput()
if err != nil { if err != nil {
t.Errorf("expected success, got %+v", err) t.Errorf("expected success, got %+v", err)
@ -32,7 +32,7 @@ func TestExecutorNoArgs(t *testing.T) {
t.Errorf("expected no output, got %q", string(out)) t.Errorf("expected no output, got %q", string(out))
} }
cmd = ex.Command("/bin/false") cmd = ex.Command("false")
out, err = cmd.CombinedOutput() out, err = cmd.CombinedOutput()
if err == nil { if err == nil {
t.Errorf("expected failure, got nil error") t.Errorf("expected failure, got nil error")