diff options
Diffstat (limited to 'src/os/exec')
| -rw-r--r-- | src/os/exec/exec_test.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/os/exec/exec_test.go b/src/os/exec/exec_test.go index f0bba11c5a..558345ff63 100644 --- a/src/os/exec/exec_test.go +++ b/src/os/exec/exec_test.go @@ -173,6 +173,9 @@ func TestExitCode(t *testing.T) { cmd := helperCommand(t, "exit", "42") cmd.Run() want := 42 + if runtime.GOOS == "plan9" { + want = 1 + } got := cmd.ProcessState.ExitCode() if want != got { t.Errorf("ExitCode got %d, want %d", got, want) @@ -181,6 +184,9 @@ func TestExitCode(t *testing.T) { cmd = helperCommand(t, "/no-exist-executable") cmd.Run() want = 2 + if runtime.GOOS == "plan9" { + want = 1 + } got = cmd.ProcessState.ExitCode() if want != got { t.Errorf("ExitCode got %d, want %d", got, want) @@ -189,6 +195,9 @@ func TestExitCode(t *testing.T) { cmd = helperCommand(t, "exit", "255") cmd.Run() want = 255 + if runtime.GOOS == "plan9" { + want = 1 + } got = cmd.ProcessState.ExitCode() if want != got { t.Errorf("ExitCode got %d, want %d", got, want) |
