MCPcopy
hub / github.com/bitfield/script / TestMain

Function TestMain

script_test.go:27–38  ·  view source on GitHub ↗
(m *testing.M)

Source from the content-addressed store, hash-verified

25)
26
27func TestMain(m *testing.M) {
28 os.Exit(testscript.RunMain(m, map[string]func() int{
29 "args": func() int {
30 script.Args().Stdout()
31 return 0
32 },
33 "echostdin": func() int {
34 script.Stdin().Stdout()
35 return 0
36 },
37 }))
38}
39
40func TestScript(t *testing.T) {
41 t.Parallel()

Callers

nothing calls this directly

Calls 3

ArgsFunction · 0.92
StdinFunction · 0.92
StdoutMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…