diff options
author | Ted Kornish <tkornish@tableau.com> | 2018-03-01 11:31:29 -0800 |
---|---|---|
committer | Ted Kornish <tkornish@tableau.com> | 2018-03-01 11:31:45 -0800 |
commit | c43616cf3afe84ba8f0e0f1a1fdaf4c425e51d37 (patch) | |
tree | 2fe3930bc78b1d3061277670d08f556537a28ecb /parser_test.go | |
parent | 161cb77e537b14c0a460a072a360844391a9cde6 (diff) |
Don't parse hyphens in Chars() unless escaped
Diffstat (limited to 'parser_test.go')
-rw-r--r-- | parser_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/parser_test.go b/parser_test.go index b2e698c..2fdaafe 100644 --- a/parser_test.go +++ b/parser_test.go @@ -114,7 +114,7 @@ func TestChars(t *testing.T) { t.Run("unescaped hyphen", func(t *testing.T) { node, ps := runParser("19-", Chars("0-9")) require.Equal(t, "19", node.Token) - require.Equal(t, 2, ps.Pos) + require.Equal(t, "-", ps.Get()) // hyphen shouldn't have been parsed require.False(t, ps.Errored()) }) |