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