From 83f64d757bc3a9957c49caa5de74d05a96724771 Mon Sep 17 00:00:00 2001 From: Shang Jian Ding Date: Thu, 2 Apr 2020 19:12:02 -0500 Subject: [PATCH] Use testenv.MustHaveExec instead of skipping based on GOOS --- src/flag/flag_test.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/flag/flag_test.go b/src/flag/flag_test.go index f87afd94e3..a7450f3f48 100644 --- a/src/flag/flag_test.go +++ b/src/flag/flag_test.go @@ -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") != "" {