Add test case for nested repetition pattern

This commit is contained in:
tdevelope 2026-01-28 18:50:00 +02:00
parent 23e1519ebe
commit 74e6235f5e
1 changed files with 17 additions and 0 deletions

View File

@ -784,6 +784,23 @@ static void test_quantifiers() {
"0xFF 0x12 0xAB 0x00 0x00 0x00",
}
);
test_grammar(
"nested repetition",
// Grammar
R"""(root ::= ("a"* )*)""",
// Passing strings
{
"",
"a",
"aa",
"aaa",
},
// Failing strings
{
"b",
"ab",
}
);
}
static void test_failure_missing_root() {