MCPcopy Index your code
hub / github.com/bitfield/script / TestExecRunsGoHelpAndGetsUsageMessage

Function TestExecRunsGoHelpAndGetsUsageMessage

script_test.go:1253–1266  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1251}
1252
1253func 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
1268func TestFileOutputsContentsOfSpecifiedFile(t *testing.T) {
1269 t.Parallel()

Callers

nothing calls this directly

Calls 3

ExecFunction · 0.92
ErrorMethod · 0.80
StringMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…