Use testenv.MustHaveExec instead of skipping based on GOOS

This commit is contained in:
Shang Jian Ding 2020-04-02 19:12:02 -05:00
parent c431241f13
commit 83f64d757b
1 changed files with 2 additions and 4 deletions

View File

@ -8,11 +8,11 @@ import (
"bytes"
. "flag"
"fmt"
"internal/testenv"
"io"
"io/ioutil"
"os"
"os/exec"
"runtime"
"sort"
"strconv"
"strings"
@ -548,9 +548,7 @@ func TestRangeError(t *testing.T) {
}
func TestExitCode(t *testing.T) {
if runtime.GOOS == "windows" || runtime.GOOS == "plan9" {
t.Skip("skipping on windows and plan9")
}
testenv.MustHaveExec(t)
magic := 123
if os.Getenv("GO_CHILD_FLAG") != "" {