From 74e6235f5e80b0a76e80bc135a48047f61dbcdcc Mon Sep 17 00:00:00 2001 From: tdevelope Date: Wed, 28 Jan 2026 18:50:00 +0200 Subject: [PATCH] Add test case for nested repetition pattern --- tests/test-grammar-integration.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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() {