1
0
Fork 0
go packages which are fine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
mediocre-go-lib/mtest/mtest_test.go

19 lines
320 B

package mtest
import (
. "testing"
"github.com/mediocregopher/mediocre-go-lib/mcfg"
)
func TestRun(t *T) {
cmp := Component()
Env(cmp, "ARG", "foo")
arg := mcfg.String(cmp, "arg", mcfg.ParamRequired())
Run(cmp, t, func() {
if *arg != "foo" {
t.Fatalf(`arg not set to "foo", is set to %q`, *arg)
}
})
}