Source file
src/cmd/nm/script_test.go
1
2
3
4
5 package main
6
7 import (
8 "cmd/internal/script/scripttest"
9 "flag"
10 "internal/testenv"
11 "os"
12 "testing"
13 )
14
15
16
17 var fixReadme = flag.Bool("fixreadme", false, "if true, update README for script tests")
18
19 func TestScript(t *testing.T) {
20 testenv.MustHaveGoBuild(t)
21
22 testExe, testExeErr := os.Executable()
23
24 repls := []scripttest.ToolReplacement{}
25 if testExeErr == nil {
26 repls = []scripttest.ToolReplacement{
27 scripttest.ToolReplacement{
28 ToolName: "nm",
29 ReplacementPath: testExe,
30 EnvVar: "GO_NMTEST_IS_NM=1",
31 },
32 }
33 }
34 scripttest.RunToolScriptTest(t, repls, "testdata/script", *fixReadme)
35 }
36
View as plain text