From e2c58411159b77a6135be3731c4a174f01d9d7a5 Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Tue, 25 Feb 2020 21:59:14 +0100 Subject: Any(): print all possible values When all of the parsers in Any() fail, instead of printing just the longest error, we print the list of all failed/expected values. The position of the error will still remain that of the longest one. --- combinator_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'combinator_test.go') diff --git a/combinator_test.go b/combinator_test.go index 40e2492..7b1be68 100644 --- a/combinator_test.go +++ b/combinator_test.go @@ -53,7 +53,7 @@ func TestAny(t *testing.T) { Seq("hello", "world", "."), Seq("hello", "brother"), )) - require.Equal(t, "offset 11: expected .", p2.Error.Error()) + require.Equal(t, "offset 11: expected nope or .", p2.Error.Error()) require.Equal(t, 11, p2.Error.Pos()) require.Equal(t, 0, p2.Pos) }) -- cgit v1.2.3