summaryrefslogtreecommitdiffstats
path: root/libxml2/test/regexp
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 21:10:17 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-11-17 21:10:17 (GMT)
commit8096d34300076a1aa9cb517de49fb920a051939f (patch)
tree5f2b1b7c41f89fedc31af973d6a747ca674cfd24 /libxml2/test/regexp
parentfc7f7edd0b8011cb71573b15462ef83068d9e54b (diff)
parent574585fa78070b0cc6b5ad22543e21a3502a122b (diff)
downloadblt-8096d34300076a1aa9cb517de49fb920a051939f.zip
blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.gz
blt-8096d34300076a1aa9cb517de49fb920a051939f.tar.bz2
Merge commit '574585fa78070b0cc6b5ad22543e21a3502a122b' 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