[libxslt] Improve seed corpus and dictionary
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxslt] Improve seed corpus and dictionary
- Date: Thu, 25 Apr 2019 09:56:44 +0000 (UTC)
commit eecd46066941e6097361da4076a17395e1e65750
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Tue Apr 23 11:01:10 2019 +0200
Improve seed corpus and dictionary
tests/fuzz/seed/xpath/exsl_node_set_1 | 1 +
tests/fuzz/seed/xpath/exsl_node_set_2 | 1 +
tests/fuzz/seed/xpath/{func_start_with => func_starts_with} | 0
.../fuzz/seed/xpath/{saxon_line_number => saxon_line_number_0} | 0
tests/fuzz/seed/xpath/saxon_line_number_1 | 1 +
tests/fuzz/seed/xpath/set_difference | 1 +
tests/fuzz/seed/xpath/set_distinct | 1 +
tests/fuzz/seed/xpath/set_has_same_node | 1 +
tests/fuzz/seed/xpath/set_intersection | 1 +
tests/fuzz/seed/xpath/set_leading | 1 +
tests/fuzz/seed/xpath/set_trailing | 1 +
tests/fuzz/seed/xslt/attr_set | 4 ++--
tests/fuzz/seed/xslt/number | 10 ++++++++++
tests/fuzz/xpath.dict | 1 +
14 files changed, 22 insertions(+), 2 deletions(-)
---
diff --git a/tests/fuzz/seed/xpath/exsl_node_set_1 b/tests/fuzz/seed/xpath/exsl_node_set_1
new file mode 100644
index 00000000..a27992a5
--- /dev/null
+++ b/tests/fuzz/seed/xpath/exsl_node_set_1
@@ -0,0 +1 @@
+exsl:node-set($n)
diff --git a/tests/fuzz/seed/xpath/exsl_node_set_2 b/tests/fuzz/seed/xpath/exsl_node_set_2
new file mode 100644
index 00000000..10b276c5
--- /dev/null
+++ b/tests/fuzz/seed/xpath/exsl_node_set_2
@@ -0,0 +1 @@
+exsl:node-set('s')
diff --git a/tests/fuzz/seed/xpath/func_start_with b/tests/fuzz/seed/xpath/func_starts_with
similarity index 100%
rename from tests/fuzz/seed/xpath/func_start_with
rename to tests/fuzz/seed/xpath/func_starts_with
diff --git a/tests/fuzz/seed/xpath/saxon_line_number b/tests/fuzz/seed/xpath/saxon_line_number_0
similarity index 100%
rename from tests/fuzz/seed/xpath/saxon_line_number
rename to tests/fuzz/seed/xpath/saxon_line_number_0
diff --git a/tests/fuzz/seed/xpath/saxon_line_number_1 b/tests/fuzz/seed/xpath/saxon_line_number_1
new file mode 100644
index 00000000..542705cf
--- /dev/null
+++ b/tests/fuzz/seed/xpath/saxon_line_number_1
@@ -0,0 +1 @@
+saxon:line-number(*)
diff --git a/tests/fuzz/seed/xpath/set_difference b/tests/fuzz/seed/xpath/set_difference
new file mode 100644
index 00000000..2e8678ba
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_difference
@@ -0,0 +1 @@
+set:difference(//*,//a:*)
diff --git a/tests/fuzz/seed/xpath/set_distinct b/tests/fuzz/seed/xpath/set_distinct
new file mode 100644
index 00000000..c7dc183b
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_distinct
@@ -0,0 +1 @@
+set:distinct(//*)
diff --git a/tests/fuzz/seed/xpath/set_has_same_node b/tests/fuzz/seed/xpath/set_has_same_node
new file mode 100644
index 00000000..83096062
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_has_same_node
@@ -0,0 +1 @@
+set:has-same-node(//*,//a:*)
diff --git a/tests/fuzz/seed/xpath/set_intersection b/tests/fuzz/seed/xpath/set_intersection
new file mode 100644
index 00000000..8f2d97f5
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_intersection
@@ -0,0 +1 @@
+set:intersection(//*,//a:*)
diff --git a/tests/fuzz/seed/xpath/set_leading b/tests/fuzz/seed/xpath/set_leading
new file mode 100644
index 00000000..2b7209ff
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_leading
@@ -0,0 +1 @@
+set:leading(//*,/*/*[3])
diff --git a/tests/fuzz/seed/xpath/set_trailing b/tests/fuzz/seed/xpath/set_trailing
new file mode 100644
index 00000000..fb00d07e
--- /dev/null
+++ b/tests/fuzz/seed/xpath/set_trailing
@@ -0,0 +1 @@
+set:trailing(//*,/*/*[2])
diff --git a/tests/fuzz/seed/xslt/attr_set b/tests/fuzz/seed/xslt/attr_set
index 9fc0a202..41c17293 100644
--- a/tests/fuzz/seed/xslt/attr_set
+++ b/tests/fuzz/seed/xslt/attr_set
@@ -1,5 +1,5 @@
<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform" xmlns:a="a" xmlns:b="b" version="1.0">
-<x:attribute-set name="s"><x:attribute name="f">v</x:attribute></x:attribute-set>
-<x:attribute-set name="t" use-attribute-set="s"><x:attribute name="g">w</x:attribute></x:attribute-set>
+<x:attribute-set name="s"><x:attribute name="a:f" namespace="a">v</x:attribute></x:attribute-set>
+<x:attribute-set name="t" use-attribute-sets="s"><x:attribute name="g">w</x:attribute></x:attribute-set>
<x:template match="a:*"><x:element name="e" use-attribute-sets="t"/><a:e
x:use-attribute-sets="t"/></x:template>
</x:stylesheet>
diff --git a/tests/fuzz/seed/xslt/number b/tests/fuzz/seed/xslt/number
new file mode 100644
index 00000000..ecc499a3
--- /dev/null
+++ b/tests/fuzz/seed/xslt/number
@@ -0,0 +1,10 @@
+<x:stylesheet xmlns:x="http://www.w3.org/1999/XSL/Transform" version="1.0">
+<x:template match="*">
+<x:number level="any" count="*" from="*" format="1.i.I.A.a"/>
+<x:number level="multiple" count="*" format="A.a.I.i.1"/>
+<x:number level="single" from="*"/>
+<x:number value="123456789" format="1" grouping-separator="." grouping-size="3"/>
+<x:apply-templates select="*"/>
+</x:template>
+</x:stylesheet>
+
diff --git a/tests/fuzz/xpath.dict b/tests/fuzz/xpath.dict
index a57026f1..bd25947b 100644
--- a/tests/fuzz/xpath.dict
+++ b/tests/fuzz/xpath.dict
@@ -50,6 +50,7 @@ op_gt=">1"
op_le="<=1"
op_ge=">=1"
op_predicate_num="[1]"
+op_predicate_last="[last()]"
op_predicate_str="['a']"
op_predicate="[1=1]"
op_arg_num=",1"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]