diff options
author | Tim Cooper <tim.cooper@layeh.com> | 2018-01-26 22:29:55 -0400 |
---|---|---|
committer | Brad Fitzpatrick <bradfitz@golang.org> | 2018-04-17 05:05:45 +0000 |
commit | 155aefe0c182f3788e44596db5f09cf94d2c6a3e (patch) | |
tree | 6b27d9146252ba957f361baa71a3fca058f96dc0 /src/os/exec/exec_test.go | |
parent | d0925228d7171eb074902a53249bccfbda51abea (diff) | |
download | go-155aefe0c182f3788e44596db5f09cf94d2c6a3e.tar.gz go-155aefe0c182f3788e44596db5f09cf94d2c6a3e.zip |
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 <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/os/exec/exec_test.go')
-rw-r--r-- | src/os/exec/exec_test.go | 10 |
1 files changed, 5 insertions, 5 deletions
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() |