(t *testing.T)
| 1251 | } |
| 1252 | |
| 1253 | func TestExecRunsGoHelpAndGetsUsageMessage(t *testing.T) { |
| 1254 | t.Parallel() |
| 1255 | p := script.Exec("go help") |
| 1256 | if p.Error() != nil { |
| 1257 | t.Fatal(p.Error()) |
| 1258 | } |
| 1259 | output, err := p.String() |
| 1260 | if err != nil { |
| 1261 | t.Fatal(err) |
| 1262 | } |
| 1263 | if !strings.Contains(output, "Usage") { |
| 1264 | t.Fatalf("want output containing the word 'Usage', got %q", output) |
| 1265 | } |
| 1266 | } |
| 1267 | |
| 1268 | func TestFileOutputsContentsOfSpecifiedFile(t *testing.T) { |
| 1269 | t.Parallel() |