INNER CODE UNIT · Go
TestExpectOptRegexp
Netflix/go-expect · expect_opt_test.go:80
func TestExpectOptRegexp(t *testing.T) {
tests := []struct {
title string
opt ExpectOpt
data string
expected bool
}{
{
"No args",
Regexp(),
"Hello world",
false,
},
{
"Single arg",
Regexp(regexp.MustCompile(`^Hello`)),
"Hello world",
true,