test choice/sequence preference
This commit is contained in:
parent
062ad5b046
commit
0837802209
@ -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"},
|
||||
}},
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user