Skip to content

Commit

Permalink
Use testenv.MustHaveExec instead of skipping based on GOOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sding3 committed Apr 3, 2020
1 parent c431241 commit 83f64d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/flag/flag_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import (
"bytes"
. "flag"
"fmt"
"internal/testenv"
"io"
"io/ioutil"
"os"
"os/exec"
"runtime"
"sort"
"strconv"
"strings"
Expand Down Expand Up @@ -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") != "" {
Expand Down

0 comments on commit 83f64d7

Please sign in to comment.