diff --git a/parse_test.go b/parse_test.go index 3ab0fb1..d41179a 100644 --- a/parse_test.go +++ b/parse_test.go @@ -710,3 +710,26 @@ func TestPartialRead(t *testing.T) { }}, ) } + +func TestChoiceSequencePriority(t *testing.T) { + runTests( + t, + `A = "a" | "b" "c"`, + []testItem{{ + title: "ac", + text: "ac", + fail: true, + }}, + ) + + runTests( + t, + `A = "a" | "b" "c"`, + []testItem{{ + title: "bc", + text: "bc", + ignorePosition: true, + node: &Node{Name: "A"}, + }}, + ) +}