From 155aefe0c182f3788e44596db5f09cf94d2c6a3e Mon Sep 17 00:00:00 2001 From: Tim Cooper Date: Fri, 26 Jan 2018 22:29:55 -0400 Subject: os/exec: remove "binary" when talking about executables The use of binary was incorrect as executable files can also be scripts. The docs for Error are also reworded. The old docs implied that Error was returned when attempting to start an executable, which is not correct: it was returned by LookPath when the file was not found or did not have the attributes of an executable. Change-Id: I757a44b16612936df4498b43c45c12e4c14956d2 Reviewed-on: https://go-review.googlesource.com/90315 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- src/os/exec/exec_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/os/exec/exec_test.go') diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index 61ffcafcd5..7bb230806f 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -142,11 +142,11 @@ func TestCatGoodAndBadFile(t *testing.T) { } } -func TestNoExistBinary(t *testing.T) { - // Can't run a non-existent binary - err := exec.Command("/no-exist-binary").Run() +func TestNoExistExecutable(t *testing.T) { + // Can't run a non-existent executable + err := exec.Command("/no-exist-executable").Run() if err == nil { - t.Error("expected error from /no-exist-binary") + t.Error("expected error from /no-exist-executable") } } @@ -334,7 +334,7 @@ func TestPipeLookPathLeak(t *testing.T) { } for i := 0; i < 6; i++ { - cmd := exec.Command("something-that-does-not-exist-binary") + cmd := exec.Command("something-that-does-not-exist-executable") cmd.StdoutPipe() cmd.StderrPipe() cmd.StdinPipe() -- cgit v1.3