summaryrefslogtreecommitdiffstats
path: root/unit-tests
diff options
context:
space:
mode:
authorJoe Thornber <thornber@redhat.com>2010-07-21 11:52:46 +0000
committerJoe Thornber <thornber@redhat.com>2010-07-21 11:52:46 +0000
commit2ef5d3061164811c2efbbdd14a62c4bd714f874f (patch)
tree2ed9e709d4b46efc359609afe187586cf467c17e /unit-tests
parent900f77b71e763115996b84a74feeefb751c9a16e (diff)
downloadlvm2-2ef5d3061164811c2efbbdd14a62c4bd714f874f.tar.gz
lvm2-2ef5d3061164811c2efbbdd14a62c4bd714f874f.tar.xz
lvm2-2ef5d3061164811c2efbbdd14a62c4bd714f874f.zip
[REGEX] another matcher_t test with a larger set of regexes, only interested in the fingerprint
Diffstat (limited to 'unit-tests')
-rw-r--r--unit-tests/regex/TESTS3
-rw-r--r--unit-tests/regex/matcher_t.expected22
-rw-r--r--unit-tests/regex/random_regexes100
3 files changed, 104 insertions, 1 deletions
diff --git a/unit-tests/regex/TESTS b/unit-tests/regex/TESTS
index 5c379d52..c6ff39c2 100644
--- a/unit-tests/regex/TESTS
+++ b/unit-tests/regex/TESTS
@@ -1 +1,2 @@
-dfa matching:$TEST_TOOL ./matcher_t dev_patterns < devices.list > matcher_t.output && diff -u matcher_t.expected matcher_t.output \ No newline at end of file
+dfa matching:$TEST_TOOL ./matcher_t dev_patterns < devices.list > matcher_t.output && diff -u matcher_t.expected matcher_t.output
+dfa matching:$TEST_TOOL ./matcher_t random_regexes < /dev/null > matcher_t.output && diff -u matcher_t.expected2 matcher_t.output \ No newline at end of file
diff --git a/unit-tests/regex/matcher_t.expected2 b/unit-tests/regex/matcher_t.expected2
new file mode 100644
index 00000000..674ba3d2
--- /dev/null
+++ b/unit-tests/regex/matcher_t.expected2
@@ -0,0 +1,2 @@
+Matcher built with 447 dfa states
+fingerprint: eed8ceb8
diff --git a/unit-tests/regex/random_regexes b/unit-tests/regex/random_regexes
new file mode 100644
index 00000000..7b9362d8
--- /dev/null
+++ b/unit-tests/regex/random_regexes
@@ -0,0 +1,100 @@
+"(((a?)(([Ub]*)|z))((([qr]|X)+)([Qn]*)))+"
+"[HZejtuw]*"
+"((B|s)*)|(((([Fv]l)(N+))(([el]|C)(tJ)))?)"
+"((([Ma]?)|(t*))*)|((([cm]E)|(M?))|(([BE][EV])|([Qj][Mh])))"
+"(((([bw]*)|([IO]*))((zK)*))|(((pU)|(i|q))|((z?)|([HL]?))))*"
+"((([Pt]?)|[Tr])?)((Hq)*)"
+"[HOXcfgikosvwxz]"
+"[BCEFGHNPTUWfjlprsy]"
+"((((aD)*)|([Xo]+))+)(([HKn](([Eq]|[JQ])(I*)))*)"
+"([LNWYeghv]|e)*"
+"(((y(L*))*)|((([EP]+)(W+))*))*"
+"U*"
+"((((R+)(W|[Qr]))|([py]+))+)([LM]*)"
+"(([DOjx](D(b?)))|([Ke]*))*"
+"((([ls](c|[FT]))*)([JS]*))*"
+"((l?)|(([Gz]+)|(D*)))*"
+"[ABgjn]"
+"(((q|[dg])?)|([Uk]*))((([Fl]?)|([Ry]+))|(([IR]|c)|(T?)))"
+"((([an]|P)|[Jw])((a*)|(m*)))*"
+"((((R[ht])(h+))?)|(([pz](n?))+))+"
+"(((([Dc]b)([Sp][Ii]))|((k|F)*))|[Uiovz])*"
+"[Res]*"
+"[Zl]|a"
+"^[ANZdf]$"
+"[En]|(((Q+)(U+))([pt]*))"
+"[ADEIMQUWXZhklrsvz]"
+"(((S(y*))*)|(j*))*"
+"n*"
+"[NUau]*"
+"((((Z*)(D|[Nd]))|(([np]|B)+))|(([Xy][Fi])*))+"
+"((([EZ]?)|(d[HR]))*)((([Hg]|q)(P+))*)"
+"q"
+"((m*)|(p|B))|((((x?)|(t+))(([Sb][PX])(O|[HM])))+)"
+"((((A*)(z[RS]))*)|(((z+)(Q*))+))*"
+"(((M*)([Uu]*))+)|[Uk]"
+"[imv]"
+"[GLSchtw](([Yw]((F[Dd])|([Tw]+)))?)"
+"([MOZj]*)(S|[Wknr])"
+"((G|q)*)[BHKN]"
+"((((NW)|([Ao]?))|((l|[UV])+))+)|((i|(z*))*)"
+"((((Z+)|([IR]?))|(L*))|([JKQ]+))+"
+"([Bdin](S*))+"
+"[HLNSTp]*"
+"(((J*)([Bq]|[Yu]))*)|([Kv]*)"
+"(((([BJ]|[Zy])(wI))*)(y*))+"
+"(((hF)+)|(H*))*"
+"((([QU][Pj])([GQ]?))+)|[PWo]"
+"(((([cq][BX])?)|((f[DI])*))*)(([GM]*)[SVYr])"
+"(([Zt]*)|((qx)|(([BV]+)(f?))))*"
+"[ILWYhsx]*"
+"(([Uy]*)|[sv])|([NSc]*)"
+"((c*)|([JUfhy]?))+"
+"(((q*)([So]*))(((g[jq])(j?))+))*"
+"((b+)|(((T+)([fw]T))?))*"
+"((([DS]?)|([Th]|u))(Q*))*"
+"[FKLX]|((([fw](L?))(([gq]*)|(O?)))?)"
+"((([HZ]+)u)*)|[APWijn]"
+"(e*)|(((v?)|((J+)(Hb)))?)"
+"(e|((w+)f))*"
+"[BEHKPQVdelnqy]"
+"((((B|N)(s*))|[Rr])(((g?)|([rv]+))+))+"
+"(((s*)|(K*))([AP]G))*"
+"[CELTp]"
+"(([Fq]?)|([Al]+))*"
+"((((r?)|(y[jx]))|([mp]*))+)|((B(S*))*)"
+"((([Eq]+)|(Y[ds]))|(x|(i|[Ku])))[IJNrvy]"
+"((([NO]*)[Ix])+)([Jenq]+)"
+"(((([HP]*)(j|y))*)[Ylqvy])*"
+"[PTv]+"
+"[AINSZhpx]|([EOYZ]*)"
+"([ABCFQv]*)((([Zx]|h)+)|([ej]*))"
+"((([pr]*)|(([Dq]|p)|(H?)))?)([NRUXmoq]*)"
+"(([er]*)|([mx]*))(((nV)([am]?))+)"
+"[BHPRlpu]"
+"(((([Ah]|[tx])|(e|[uy]))?)((([fl]+)([Vz]|v))*))*"
+"[AGdm]"
+"(((K*)^(O*)$)|(B?))*"
+"((([Ks]|[Ka])*)|([FSTab]?))?"
+"(([kw]+)[ei])(([Hy]*)(([Mc]*)|(G|f)))"
+"((((e*)|(Zf))|(R|[nq]))((([Jz]v)([Rj]+))+))*"
+"(((a?)|(e?))(([Uc]*)(S+)))*"
+"((((E+)([MZ]?))+)|(((s|[Az])|z)*))?"
+"((((i[MO])*)|((LH)*))|(((BA)|([AI]+))|[Ug]))*"
+"[EGHILcho]*"
+"(((Z[vw])?)((z|g)+))(((H|U)([iv]Q))|([qw]?))"
+"(([ehmr]|((L[Uw])*))+)((a+)I)"
+"[EKNSWYagj](((v|[TX])|([Uk]+))*)"
+"(((R[Mo])|(O*))|([Fm]|([qw]*)))((m*)|((S|[Ki])?))"
+"((((kP)|c)?)((([do]+)|([Gi]?))*))*"
+"((^(B|W)$|([Ww]+))([no]*))|((([iv]?)|(M*))|((x|L)?))"
+"[AEGPRSbcfhsy]"
+"[Wbcf]|((([MO]?)|([NT]|m))(([Oo]?)([Wg]*)))"
+"(((YZ)*)[PQVei])*"
+"[GJKYt][AEGWdegmnt]"
+"^[CDEGJKNUVYZagkv]$"
+"([DPWbx]*)|(((q|B)|(P|u))((M[Bq])*))"
+"[FHIJRTVYZdiorsuvz]*"
+"([MWoqvz]*)|^(l*)"
+"(((I|[Rx])*)((X[Mf])([Xa]L)))([Ha]|([HY]*))"
+"(((l|[Sd])*)((([Ix]+)|([XY]?))(Z*)))+"