Test Regexp failure message
This commit is contained in:
parent
c22246b7de
commit
f3a37f5fb6
@ -58,7 +58,13 @@ func TestRegexp(t *testing.T) {
|
||||
test.ErrorIs(t, err, expectedErr)
|
||||
test.False(t, succeeded)
|
||||
})
|
||||
t.Run("returns a useful Got value", Todo)
|
||||
t.Run("returns a useful Got value", func(t *testing.T) {
|
||||
p := pbytes.Regexp("hello")
|
||||
result, err := p(gigaparsec.MakeState(strings.NewReader("hellaparsec")))
|
||||
|
||||
must.NoError(t, err)
|
||||
test.StrContains(t, result.Message().Got(), "hella")
|
||||
})
|
||||
}
|
||||
|
||||
func TestRuneReader(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user