diff --git a/tests/test-grammar-integration.cpp b/tests/test-grammar-integration.cpp index 7aa7e58a5c..f8b3a028db 100644 --- a/tests/test-grammar-integration.cpp +++ b/tests/test-grammar-integration.cpp @@ -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() {