diff options
Diffstat (limited to 'parser_test.go')
-rw-r--r-- | parser_test.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/parser_test.go b/parser_test.go index 594fcae..caa2f8b 100644 --- a/parser_test.go +++ b/parser_test.go @@ -72,6 +72,12 @@ func TestExact(t *testing.T) { require.Equal(t, "o", ps.Error.Expected) require.Equal(t, 0, ps.Pos) }) + + t.Run("eof char", func(t *testing.T) { + _, ps := runParser("", Exact("o")) + require.Equal(t, "o", ps.Error.Expected) + require.Equal(t, 0, ps.Pos) + }) } func TestChars(t *testing.T) { |