From 669258f007c0b3ff8f8fcac7cfda8c07754c8979 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Wed, 1 Mar 2006 22:17:14 +0000 Subject: Add another test, use for those hanging -c --- test/regex/Makefile | 6 ++- test/regex/interpretation.dat | 93 +++++++++++++++++++++++++++++++++++++++++++ test/regex/testregexi.c | 1 + 3 files changed, 98 insertions(+), 2 deletions(-) create mode 100644 test/regex/interpretation.dat create mode 100644 test/regex/testregexi.c (limited to 'test') diff --git a/test/regex/Makefile b/test/regex/Makefile index 9ad289ab2..ca199bcbb 100644 --- a/test/regex/Makefile +++ b/test/regex/Makefile @@ -1,7 +1,7 @@ # uClibc regex tests # Licensed under the GNU Library General Public License, see COPYING.LIB -TESTS_DISABLED := testregexn +#TESTS_DISABLED := testregexi testregexn include ../Test.mak @@ -10,6 +10,7 @@ CFLAGS_tst-regex2 := -std=c99 CFLAGS-OMIT_testregex := -D_GNU_SOURCE CFLAGS-OMIT_testregexc := -D_GNU_SOURCE CFLAGS-OMIT_testregexf := -D_GNU_SOURCE +CFLAGS-OMIT_testregexi := -D_GNU_SOURCE CFLAGS-OMIT_testregexl := -D_GNU_SOURCE CFLAGS-OMIT_testregexn := -D_GNU_SOURCE CFLAGS-OMIT_testregexp := -D_GNU_SOURCE @@ -18,7 +19,8 @@ CFLAGS-OMIT_testregexr := -D_GNU_SOURCE OPTS_testregex := < basic.dat OPTS_testregexc := < categorize.dat OPTS_testregexf := < forcedassoc.dat +OPTS_testregexi := -c < interpretation.dat OPTS_testregexl := < leftassoc.dat -OPTS_testregexn := < nullsubexpr.dat +OPTS_testregexn := -c < nullsubexpr.dat OPTS_testregexp := < repetition.dat OPTS_testregexr := < rightassoc.dat diff --git a/test/regex/interpretation.dat b/test/regex/interpretation.dat new file mode 100644 index 000000000..72e186eb7 --- /dev/null +++ b/test/regex/interpretation.dat @@ -0,0 +1,93 @@ +:RE#01:E a+ xaax (1,3) +:RE#02:B .\(a*\). xaax (0,4)(1,3) +:RE#03:E (a?)((ab)?) ab (0,2)(0,0)(0,2)(0,2) +:RE#04:E (a?)((ab)?)(b?) ab (0,2)(0,1)(1,1)(?,?)(1,2) +:RE#05:E ((a?)((ab)?))(b?) ab (0,2)(0,2)(0,0)(0,2)(0,2)(2,2) +:RE#06:E (a?)(((ab)?)(b?)) ab (0,2)(0,1)(1,2)(1,1)(?,?)(1,2) +:RE#07:E (.?) x (0,1)(0,1) +:RE#08:E (.?){1} x (0,1)(0,1) +:RE#09:E (.?)(.?) x (0,1)(0,1)(1,1) +:RE#10:E (.?){2} x (0,1)(1,1) +:RE#11:E (.?)* x (0,1)(0,1) +:RE#12:E (.?.?) xxx (0,2)(0,2) +:RE#13:E (.?.?){1} xxx (0,2)(0,2) +:RE#14:E (.?.?)(.?.?) xxx (0,3)(0,2)(2,3) +:RE#15:E (.?.?){2} xxx (0,3)(2,3) +:RE#16:E (.?.?)(.?.?)(.?.?) xxx (0,3)(0,2)(2,3)(3,3) +:RE#17:E (.?.?){3} xxx (0,3)(3,3) +:RE#18:E (.?.?)* xxx (0,3)(2,3) +:RE#19:E a?((ab)?)(b?) ab (0,2)(1,1)(?,?)(1,2) +:RE#20:E (a?)((ab)?)b? ab (0,2)(0,1)(1,1)(?,?) +:RE#21:E a?((ab)?)b? ab (0,2)(1,1)(?,?) +:RE#22:E (a*){2} xxxxx (0,0)(0,0) +:RE#23:E (ab?)(b?a) aba (0,3)(0,2)(2,3) +:RE#24:E (a|ab)(ba|a) aba (0,3)(0,2)(2,3) +:RE#25:E (a|ab|ba) aba (0,2)(0,2) +:RE#26:E (a|ab|ba)(a|ab|ba) aba (0,3)(0,2)(2,3) +:RE#27:E (a|ab|ba)* aba (0,3)(2,3) +:RE#28:E (aba|a*b) ababa (0,3)(0,3) +:RE#29:E (aba|a*b)(aba|a*b) ababa (0,5)(0,2)(2,5) +:RE#30:E (aba|a*b)* ababa (0,5)(2,5) +:RE#31:E (aba|ab|a) ababa (0,3)(0,3) +:RE#32:E (aba|ab|a)(aba|ab|a) ababa (0,5)(0,2)(2,5) +:RE#33:E (aba|ab|a)* ababa (0,5)(2,5) +:RE#34:E (a(b)?) aba (0,2)(0,2)(1,2) +:RE#35:E (a(b)?)(a(b)?) aba (0,3)(0,2)(1,2)(2,3)(?,?) +:RE#36:E (a(b)?)+ aba (0,3)(2,3)(?,?) +:RE#37:E (.*)(.*) xx (0,2)(0,2)(2,2) +:RE#38:E .*(.*) xx (0,2)(2,2) +:RE#39:E (a.*z|b.*y) azbazby (0,5)(0,5) +:RE#40:E (a.*z|b.*y)(a.*z|b.*y) azbazby (0,7)(0,5)(5,7) +:RE#41:E (a.*z|b.*y)* azbazby (0,7)(5,7) +:RE#42:E (.|..)(.*) ab (0,2)(0,2)(2,2) +:RE#43:E ((..)*(...)*) xxx (0,3)(0,3)(?,?)(0,3) +:RE#44:E ((..)*(...)*)((..)*(...)*) xxx (0,3)(0,3)(?,?)(0,3)(3,3)(?,?) +:RE#45:E ((..)*(...)*)* xxx (0,3)(0,3)(?,?)(0,3) +:RE#46:B \(a\{0,1\}\)*b\1 ab (0,2)(1,1) +:RE#47:B \(a*\)*b\1 ab (0,2)(1,1) +:RE#48:B \(a*\)b\1* ab (0,2)(0,1) +:RE#49:B \(a*\)*b\1* ab (0,2)(1,1) +:RE#50:B \(a\{0,1\}\)*b\(\1\) ab (0,2)(1,1)(2,2) +:RE#51:B \(a*\)*b\(\1\) ab (0,2)(1,1)(2,2) +:RE#52:B \(a*\)b\(\1\)* ab (0,2)(0,1)(?,?) +:RE#53:B \(a*\)*b\(\1\)* ab (0,2)(1,1)(2,2) +:RE#54:B \(a\{0,1\}\)*b\1 aba (0,3)(0,1) +:RE#55:B \(a*\)*b\1 aba (0,3)(0,1) +:RE#56:B \(a*\)b\1* aba (0,3)(0,1) +:RE#57:B \(a*\)*b\1* aba (0,3)(0,1) +:RE#58:B \(a*\)*b\(\1\)* aba (0,3)(0,1)(2,3) +:RE#59:B \(a\{0,1\}\)*b\1 abaa (0,3)(0,1) +:RE#60:B \(a*\)*b\1 abaa (0,3)(0,1) +:RE#61:B \(a*\)b\1* abaa (0,4)(0,1) +:RE#62:B \(a*\)*b\1* abaa (0,4)(0,1) +:RE#63:B \(a*\)*b\(\1\)* abaa (0,4)(0,1)(3,4) +:RE#64:B \(a\{0,1\}\)*b\1 aab (0,3)(2,2) +:RE#65:B \(a*\)*b\1 aab (0,3)(2,2) +:RE#66:B \(a*\)b\1* aab (0,3)(0,2) +:RE#67:B \(a*\)*b\1* aab (0,3)(2,2) +:RE#68:B \(a*\)*b\(\1\)* aab (0,3)(2,2)(3,3) +:RE#69:B \(a\{0,1\}\)*b\1 aaba (0,4)(1,2) +:RE#70:B \(a*\)*b\1 aaba (0,4)(1,2) +:RE#71:B \(a*\)b\1* aaba (0,3)(0,2) +:RE#72:B \(a*\)*b\1* aaba (0,4)(1,2) +:RE#73:B \(a*\)*b\(\1\)* aaba (0,4)(1,2)(3,4) +:RE#74:B \(a\{0,1\}\)*b\1 aabaa (0,4)(1,2) +:RE#75:B \(a*\)*b\1 aabaa (0,5)(0,2) +:RE#76:B \(a*\)b\1* aabaa (0,5)(0,2) +:RE#77:B \(a*\)*b\1* aabaa (0,5)(0,2) +:RE#78:B \(a*\)*b\(\1\)* aabaa (0,5)(0,2)(3,5) +:RE#79:B \(x\)*a\1 a NOMATCH +:RE#80:B \(x\)*a\1* a (0,1)(?,?) +:RE#81:B \(x\)*a\(\1\) a NOMATCH +:RE#82:B \(x\)*a\(\1\)* a (0,1)(?,?)(?,?) +:RE#83:E (aa(b(b))?)+ aabbaa (0,6)(4,6)(?,?)(?,?) +:RE#84:E (a(b)?)+ aba (0,3)(2,3)(?,?) +:RE#85:E ([ab]+)([bc]+)([cd]*) abcd (0,4)(0,2)(2,3)(3,4) +:RE#86:B \([ab]*\)\([bc]*\)\([cd]*\)\1 abcdaa (0,5)(0,1)(1,3)(3,4) +:RE#87:B \([ab]*\)\([bc]*\)\([cd]*\)\1 abcdab (0,6)(0,2)(2,3)(3,4) +:RE#88:B \([ab]*\)\([bc]*\)\([cd]*\)\1* abcdaa (0,6)(0,1)(1,3)(3,4) +:RE#89:B \([ab]*\)\([bc]*\)\([cd]*\)\1* abcdab (0,6)(0,2)(2,3)(3,4) +:RE#90:E ^(A([^B]*))?(B(.*))? Aa (0,2)(0,2)(1,2) +:RE#91:E ^(A([^B]*))?(B(.*))? Bb (0,2)(?,?)(?,?)(0,2)(1,2) +:RE#92:B .*\([AB]\).*\1 ABA (0,3)(0,1) +:RE#93:B$ [^A]*A \nA (0,2) diff --git a/test/regex/testregexi.c b/test/regex/testregexi.c new file mode 100644 index 000000000..46b3ee848 --- /dev/null +++ b/test/regex/testregexi.c @@ -0,0 +1 @@ +#include "testregex.c" -- cgit v1.2.3