From: helly Date: Sun, 9 Apr 2006 11:17:11 +0000 (+0000) Subject: - Update tests after manually verifying results using gdb X-Git-Tag: 0.13.6~410 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5642deaa46777b8828dfd4bbdf7c29d287830d28;p=re2c - Update tests after manually verifying results using gdb --- diff --git a/test/bug1454253.c b/test/bug1454253.c index d877a8da..8e1fc98d 100755 --- a/test/bug1454253.c +++ b/test/bug1454253.c @@ -306,11 +306,18 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 2, "20"); do_scan("#", 1, "0"); + do_scan("##", 2, "0"); + do_scan("##?", 2, "0"); + do_scan("##|", 3, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 4, "20"); do_scan("?1?2!1?2??", 6, "220"); - do_scan("?1?2?!1?2??", 11, "22120"); + do_scan("?1?2?!1?2??", 9, "22120"); do_scan("?1?2?!1?2?!", 12, "221213"); - do_scan("?1?123?45??", 11, "2220"); + do_scan("?1?123?45??", 9, "2220"); do_scan("?1?123?45?!", 12, "22213"); } diff --git a/test/bug1454253.re b/test/bug1454253.re index 69cbc2a3..3a7e7137 100755 --- a/test/bug1454253.re +++ b/test/bug1454253.re @@ -67,11 +67,18 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 2, "20"); do_scan("#", 1, "0"); + do_scan("##", 2, "0"); + do_scan("##?", 2, "0"); + do_scan("##|", 3, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 4, "20"); do_scan("?1?2!1?2??", 6, "220"); - do_scan("?1?2?!1?2??", 11, "22120"); + do_scan("?1?2?!1?2??", 9, "22120"); do_scan("?1?2?!1?2?!", 12, "221213"); - do_scan("?1?123?45??", 11, "2220"); + do_scan("?1?123?45??", 9, "2220"); do_scan("?1?123?45?!", 12, "22213"); } diff --git a/test/bug1454253.s.c b/test/bug1454253.s.c index 5ad6df3a..eb0415a1 100755 --- a/test/bug1454253.s.c +++ b/test/bug1454253.s.c @@ -133,11 +133,18 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 2, "20"); do_scan("#", 1, "0"); + do_scan("##", 2, "0"); + do_scan("##?", 2, "0"); + do_scan("##|", 3, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 4, "20"); do_scan("?1?2!1?2??", 6, "220"); - do_scan("?1?2?!1?2??", 11, "22120"); + do_scan("?1?2?!1?2??", 9, "22120"); do_scan("?1?2?!1?2?!", 12, "221213"); - do_scan("?1?123?45??", 11, "2220"); + do_scan("?1?123?45??", 9, "2220"); do_scan("?1?123?45?!", 12, "22213"); } diff --git a/test/bug1454253.s.re b/test/bug1454253.s.re index 69cbc2a3..3a7e7137 100755 --- a/test/bug1454253.s.re +++ b/test/bug1454253.s.re @@ -67,11 +67,18 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 2, "20"); do_scan("#", 1, "0"); + do_scan("##", 2, "0"); + do_scan("##?", 2, "0"); + do_scan("##|", 3, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 4, "20"); do_scan("?1?2!1?2??", 6, "220"); - do_scan("?1?2?!1?2??", 11, "22120"); + do_scan("?1?2?!1?2??", 9, "22120"); do_scan("?1?2?!1?2?!", 12, "221213"); - do_scan("?1?123?45??", 11, "2220"); + do_scan("?1?123?45??", 9, "2220"); do_scan("?1?123?45?!", 12, "22213"); } diff --git a/test/bug1454253b.s.c b/test/bug1454253b.s.c index 246fe372..45aea096 100755 --- a/test/bug1454253b.s.c +++ b/test/bug1454253b.s.c @@ -113,8 +113,15 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 4, "20"); do_scan("#", 1, "0"); + do_scan("##", 1, "0"); + do_scan("##?", 1, "0"); + do_scan("##|", 1, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 3, "20"); do_scan("?1?2!1?2??", 5, "220"); do_scan("?1?2?!1?2??", 11, "22120"); do_scan("?1?2?!1?2?!", 12, "221210"); diff --git a/test/bug1454253b.s.re b/test/bug1454253b.s.re index 1f3a63da..aca10160 100755 --- a/test/bug1454253b.s.re +++ b/test/bug1454253b.s.re @@ -60,8 +60,15 @@ void _do_scan(const char * str, size_t str_len, size_t scn_len, const char * exp main() { + do_scan("?1??", 4, "20"); do_scan("#", 1, "0"); + do_scan("##", 1, "0"); + do_scan("##?", 1, "0"); + do_scan("##|", 1, "0"); + do_scan("?!|", 3, "10"); + do_scan("?!?1|", 5, "120"); do_scan("?!?a+", 5, "120"); + do_scan("?2!1?2??", 3, "20"); do_scan("?1?2!1?2??", 5, "220"); do_scan("?1?2?!1?2??", 11, "22120"); do_scan("?1?2?!1?2?!", 12, "221210");