summaryrefslogtreecommitdiffstats
path: root/libxml2/test/regexp
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 20:58:44 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 20:58:44 (GMT)
commit4f65b25b474bf534e40c3d3aa47d43e8457fcc9a (patch)
tree21aab4f800fd8a5046a929b3243edf9d461917d5 /libxml2/test/regexp
parent5720be2a1ff34bf88992db24716f1e489a745e01 (diff)
parent4464fd97bf7e813b5badf1937e59f6fb5d2be646 (diff)
downloadblt-4f65b25b474bf534e40c3d3aa47d43e8457fcc9a.zip
blt-4f65b25b474bf534e40c3d3aa47d43e8457fcc9a.tar.gz
blt-4f65b25b474bf534e40c3d3aa47d43e8457fcc9a.tar.bz2
Merge commit '4464fd97bf7e813b5badf1937e59f6fb5d2be646' as 'libxml2'
Diffstat (limited to 'libxml2/test/regexp')
-rw-r--r--libxml2/test/regexp/branch14
-rw-r--r--libxml2/test/regexp/bug31633820
-rw-r--r--libxml2/test/regexp/bug42059610
-rw-r--r--libxml2/test/regexp/content12
-rw-r--r--libxml2/test/regexp/hard12
-rw-r--r--libxml2/test/regexp/ncname6
-rw-r--r--libxml2/test/regexp/ranges15
-rw-r--r--libxml2/test/regexp/ranges214
-rw-r--r--libxml2/test/regexp/xpath37
9 files changed, 140 insertions, 0 deletions
diff --git a/libxml2/test/regexp/branch b/libxml2/test/regexp/branch
new file mode 100644
index 0000000..6a728e6
--- /dev/null
+++ b/libxml2/test/regexp/branch
@@ -0,0 +1,14 @@
+=>a|b(d|e(g|h|i)|f)|c
+a
+c
+bd
+bf
+beg
+beh
+bei
+b
+be
+bi
+f
+ab
+ac
diff --git a/libxml2/test/regexp/bug316338 b/libxml2/test/regexp/bug316338
new file mode 100644
index 0000000..98c7838
--- /dev/null
+++ b/libxml2/test/regexp/bug316338
@@ -0,0 +1,20 @@
+=>(((C|c)(([\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?){3})+[\s]*))+
+C 433
+C 433 12
+C 433 123
+C 433 123 456
+C 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12
+=>(((C|c)(([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?){3})+[\s]*))+
+C 433
+C 433 12
+C 433 123
+C 433 123 456
+C 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12
+=>(((C|c)(([\s]+\-?[0-9]+(\.[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?){3})+[\s]*))+
+C 433
+C 433 12
+C 433 123
+C 433 123 456
+C 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12
+=>(((M|m)([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?)[\s]*)|((L|l)([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?)+[\s]*)|((H|h)([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?)+[\s]*)|((V|v)([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?)+[\s]*)|((C|c)(([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?){3})+[\s]*)|((Q|q)(([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?){2})+[\s]*)|((S|s)(([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?){2})+[\s]*)|((A|a)([\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]+[0-1][\s]+[0-1][\s]+\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?[\s]*,[\s]*\-?[0-9]+(\.[0-9]+)?((e|E)\-?[0-9]+)?)+[\s]*)|((Z|z)[\s]*))*
+M 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12 724.64,433.12 718.08,433.12 711.52,433.12
diff --git a/libxml2/test/regexp/bug420596 b/libxml2/test/regexp/bug420596
new file mode 100644
index 0000000..b6f285d
--- /dev/null
+++ b/libxml2/test/regexp/bug420596
@@ -0,0 +1,10 @@
+=>(\+|-)(0[0-9]|1[0-1])
++01
+-01
++10
+-10
+=>[+-](0[0-9]|1[0-1])
++01
+-01
++10
+-10
diff --git a/libxml2/test/regexp/content b/libxml2/test/regexp/content
new file mode 100644
index 0000000..9d01c8b
--- /dev/null
+++ b/libxml2/test/regexp/content
@@ -0,0 +1,12 @@
+=>((a|b|c)def)
+adef
+bdef
+adefg
+aaef
+=>((a|b|c|d|e|f)?(g|h|i)+(k|l)*)
+g
+gi
+fil
+gikl
+cghhhiill
+ak
diff --git a/libxml2/test/regexp/hard b/libxml2/test/regexp/hard
new file mode 100644
index 0000000..ddb4cfd
--- /dev/null
+++ b/libxml2/test/regexp/hard
@@ -0,0 +1,12 @@
+=>((a|b|\p{Nd}){1,2}|aaa|bbbb){1,2}
+bab
+aaca
+aaabbbb
+a0b
+aa0aaa
+b0aaa
+=>(\d{1,3}\.){3}\d{1,3}
+1.2.3.4
+1.22.333.44
+1.2.3
+1..2.3
diff --git a/libxml2/test/regexp/ncname b/libxml2/test/regexp/ncname
new file mode 100644
index 0000000..1e452a8
--- /dev/null
+++ b/libxml2/test/regexp/ncname
@@ -0,0 +1,6 @@
+=>[\i-[:]][\c-[:]]*
+a
+abc
+abc1d
+1ac
+a1b:c
diff --git a/libxml2/test/regexp/ranges b/libxml2/test/regexp/ranges
new file mode 100644
index 0000000..cb7c22f
--- /dev/null
+++ b/libxml2/test/regexp/ranges
@@ -0,0 +1,15 @@
+=>a{2,3}
+a
+aa
+aaa
+aaaa
+=>ba{2,3}c
+bac
+baac
+baaac
+baaaac
+=>a(b|c){2,3}d
+abcd
+acccd
+abd
+accccd
diff --git a/libxml2/test/regexp/ranges2 b/libxml2/test/regexp/ranges2
new file mode 100644
index 0000000..a8eb884
--- /dev/null
+++ b/libxml2/test/regexp/ranges2
@@ -0,0 +1,14 @@
+=>(a|b{0,3}){0,1}
+a
+aa
+b
+bb
+bbb
+bbbb
+ab
+ba
+=>([0-9]{0,3}|([0-9]{0}|[0-9]{0,3})){0,3}
+0
+00
+123
+abc
diff --git a/libxml2/test/regexp/xpath b/libxml2/test/regexp/xpath
new file mode 100644
index 0000000..62c18c4
--- /dev/null
+++ b/libxml2/test/regexp/xpath
@@ -0,0 +1,37 @@
+=>(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*(\|(\.//)?(((child::)?((\i\c*:)?(\i\c*|\*)))|\.)(/(((child::)?((\i\c*:)?(\i\c*|\*)))|\.))*)*
+a
+a12/b312/b312/b312/b312/b312/b312/b312/b312/b312/b312/b312/b3
+*
+a|b
+.//a:b
+a/b/c
+a/*/b
+a:*/b:*/c:*
+child::a/child::b:*
+child::a/child::b:*|a/*/b|.//a:b
+1
+1ab
+a:1
+@a
+ancestor::a
+#
+# the previous regexp from the Schemas for Schemas was broken
+# here is the fixed one:
+# http://lists.w3.org/Archives/Public/www-xml-schema-comments/2002AprJun/0005.html
+#
+=>(\.//)?(((child::)?(([\i-[:]][\c-[:]]*:)?([\i-[:]][\c-[:]]*|\*)))|\.)(/(((child::)?(([\i-[:]][\c-[:]]*:)?([\i-[:]][\c-[:]]*|\*)))|\.))*(\|(\.//)?(((child::)?(([\i-[:]][\c-[:]]*:)?([\i-[:]][\c-[:]]*|\*)))|\.)(/(((child::)?(([\i-[:]][\c-[:]]*:)?([\i-[:]][\c-[:]]*|\*)))|\.))*)*
+a
+a12/b312/b312/b312/b312/b312/b312/b312/b312/b312/b312/b312/b3
+*
+a|b
+.//a:b
+a/b/c
+a/*/b
+a:*/b:*/c:*
+child::a/child::b:*
+child::a/child::b:*|a/*/b|.//a:b
+1
+1ab
+a:1
+@a
+ancestor::a