Merge lp:~zorba-coders/zorba/fix_assert_xml into lp:zorba
- fix_assert_xml
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Chris Hillery |
Approved revision: | 11257 |
Merged at revision: | 11257 |
Proposed branch: | lp:~zorba-coders/zorba/fix_assert_xml |
Merge into: | lp:zorba |
Diff against target: |
431 lines (+107/-75) 6 files modified
test/fots/CMakeLists.txt (+0/-38) test/fots_driver/evaluate.xq (+48/-23) test/fots_driver/fots-driver.xq (+5/-6) test/fots_driver/tools/list_node_names_with_file_attribute.xq (+45/-0) test/fots_driver/tools/process.xq (+2/-1) test/fots_driver/util.xq (+7/-7) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/fix_assert_xml |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Hillery | Approve | ||
Sorin Marian Nasoi | Approve | ||
Review via email: mp+150353@code.launchpad.net |
Commit message
Fix FOTS driver bug that caused <assert-xml file="SOME_URI"/> to be interpreted as <assert-xml/>.
This fixes 37 test cases.
Description of the change
Fix FOTS driver bug that caused <assert-xml file="SOME_URI"/> to be interpreted as <assert-xml/>.
This fixes 37 test cases.
Sorin Marian Nasoi (sorin.marian.nasoi) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/fix_assert_xml into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job fix_assert_
The final status was:
8 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Sorin Marian Nasoi (sorin.marian.nasoi) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.
Sorin Marian Nasoi (sorin.marian.nasoi) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/fix_assert_xml into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job fix_assert_
The final status was:
1 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Chris Hillery (ceejatec) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job fix_assert_
All tests succeeded!
Preview Diff
1 | === modified file 'test/fots/CMakeLists.txt' | |||
2 | --- test/fots/CMakeLists.txt 2013-02-22 07:31:48 +0000 | |||
3 | +++ test/fots/CMakeLists.txt 2013-02-25 16:22:31 +0000 | |||
4 | @@ -121,7 +121,6 @@ | |||
5 | 121 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog010 0) | 121 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog010 0) |
6 | 122 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog011 0) | 122 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog011 0) |
7 | 123 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog012 0) | 123 | EXPECTED_FOTS_FAILURE (app-CatalogCheck Catalog012 0) |
8 | 124 | EXPECTED_FOTS_FAILURE (app-Demos sudoku 0) | ||
9 | 125 | EXPECTED_FOTS_FAILURE (app-Demos currencysvg 0) | 124 | EXPECTED_FOTS_FAILURE (app-Demos currencysvg 0) |
10 | 126 | EXPECTED_FOTS_FAILURE (app-Demos itunes 0) | 125 | EXPECTED_FOTS_FAILURE (app-Demos itunes 0) |
11 | 127 | EXPECTED_FOTS_FAILURE (app-FunctxFn functx-fn-number-all 0) | 126 | EXPECTED_FOTS_FAILURE (app-FunctxFn functx-fn-number-all 0) |
12 | @@ -133,25 +132,7 @@ | |||
13 | 133 | EXPECTED_FOTS_FAILURE (app-FunctxFunctx functx-functx-sort-all 0) | 132 | EXPECTED_FOTS_FAILURE (app-FunctxFunctx functx-functx-sort-all 0) |
14 | 134 | EXPECTED_FOTS_FAILURE (app-UseCaseNS ns-queries-results-q5 0) | 133 | EXPECTED_FOTS_FAILURE (app-UseCaseNS ns-queries-results-q5 0) |
15 | 135 | EXPECTED_FOTS_FAILURE (app-UseCaseNS ns-queries-results-q8 0) | 134 | EXPECTED_FOTS_FAILURE (app-UseCaseNS ns-queries-results-q8 0) |
16 | 136 | EXPECTED_FOTS_FAILURE (app-UseCaseSTRING string-queries-results-q1 0) | ||
17 | 137 | EXPECTED_FOTS_FAILURE (app-UseCaseSTRING string-queries-results-q2 0) | ||
18 | 138 | EXPECTED_FOTS_FAILURE (app-UseCaseSTRING string-queries-results-q4 0) | ||
19 | 139 | EXPECTED_FOTS_FAILURE (app-UseCaseSTRING string-queries-results-q5 0) | ||
20 | 140 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q2 0) | ||
21 | 141 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q3 0) | 135 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q3 0) |
22 | 142 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q8 0) | ||
23 | 143 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q9 0) | ||
24 | 144 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q10 0) | ||
25 | 145 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q11 0) | ||
26 | 146 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q12 0) | ||
27 | 147 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q13 0) | ||
28 | 148 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q14 0) | ||
29 | 149 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q15 0) | ||
30 | 150 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q16 0) | ||
31 | 151 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q17 0) | ||
32 | 152 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q18 0) | ||
33 | 153 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q19 0) | ||
34 | 154 | EXPECTED_FOTS_FAILURE (app-XMark XMark-Q20 0) | ||
35 | 155 | EXPECTED_FOTS_FAILURE (app-XMark XMark-All 0) | 136 | EXPECTED_FOTS_FAILURE (app-XMark XMark-All 0) |
36 | 156 | EXPECTED_FOTS_FAILURE (fn-adjust-date-to-timezone cbcl-adjust-date-to-timezone-002 0) | 137 | EXPECTED_FOTS_FAILURE (fn-adjust-date-to-timezone cbcl-adjust-date-to-timezone-002 0) |
37 | 157 | EXPECTED_FOTS_FAILURE (fn-adjust-date-to-timezone cbcl-adjust-date-to-timezone-003 0) | 138 | EXPECTED_FOTS_FAILURE (fn-adjust-date-to-timezone cbcl-adjust-date-to-timezone-003 0) |
38 | @@ -793,14 +774,7 @@ | |||
39 | 793 | EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-8 0) | 774 | EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-8 0) |
40 | 794 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList Constr-attr-nsprein-3 0) | 775 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList Constr-attr-nsprein-3 0) |
41 | 795 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList Constr-attr-nsprein-4 0) | 776 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList Constr-attr-nsprein-4 0) |
42 | 796 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList K2-DirectConElemAttr-75 0) | ||
43 | 797 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList DirectConElemAttr-1 0) | 777 | EXPECTED_FOTS_FAILURE (prod-DirAttributeList DirectConElemAttr-1 0) |
44 | 798 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-49 0) | ||
45 | 799 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-50 0) | ||
46 | 800 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-51 0) | ||
47 | 801 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-52 0) | ||
48 | 802 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-53 0) | ||
49 | 803 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-54 0) | ||
50 | 804 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-66 0) | 778 | EXPECTED_FOTS_FAILURE (prod-DirectConstructor K2-DirectConOther-66 0) |
51 | 805 | EXPECTED_FOTS_FAILURE (prod-DirElemConstructor K2-DirectConElem-38 0) | 779 | EXPECTED_FOTS_FAILURE (prod-DirElemConstructor K2-DirectConElem-38 0) |
52 | 806 | EXPECTED_FOTS_FAILURE (prod-DirElemConstructor K2-DirectConElem-48 0) | 780 | EXPECTED_FOTS_FAILURE (prod-DirElemConstructor K2-DirectConElem-48 0) |
53 | @@ -819,21 +793,10 @@ | |||
54 | 819 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-12 0) | 793 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-12 0) |
55 | 820 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-21 0) | 794 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-21 0) |
56 | 821 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-22 0) | 795 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace Constr-inscope-22 0) |
57 | 822 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-15 0) | ||
58 | 823 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-16 0) | ||
59 | 824 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-17 0) | ||
60 | 825 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-18 0) | ||
61 | 826 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-19 0) | ||
62 | 827 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-20 0) | ||
63 | 828 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-21 0) | ||
64 | 829 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-22 0) | ||
65 | 830 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-23 0) | ||
66 | 831 | EXPECTED_FOTS_FAILURE (prod-DirElemContent.whitespace Constr-ws-enclexpr-24 0) | ||
67 | 832 | EXPECTED_FOTS_FAILURE (prod-EQName eqname-017 0) | 796 | EXPECTED_FOTS_FAILURE (prod-EQName eqname-017 0) |
68 | 833 | EXPECTED_FOTS_FAILURE (prod-FLWORExpr step-expr-si-2 0) | 797 | EXPECTED_FOTS_FAILURE (prod-FLWORExpr step-expr-si-2 0) |
69 | 834 | EXPECTED_FOTS_FAILURE (prod-FLWORExpr step-expr-si-3 0) | 798 | EXPECTED_FOTS_FAILURE (prod-FLWORExpr step-expr-si-3 0) |
70 | 835 | EXPECTED_FOTS_FAILURE (prod-ForClause ForExpr004 0) | 799 | EXPECTED_FOTS_FAILURE (prod-ForClause ForExpr004 0) |
71 | 836 | EXPECTED_FOTS_FAILURE (prod-ForClause ForExpr013 0) | ||
72 | 837 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-003 0) | 800 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-003 0) |
73 | 838 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-005 0) | 801 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-005 0) |
74 | 839 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-009 0) | 802 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-009 0) |
75 | @@ -993,7 +956,6 @@ | |||
76 | 993 | EXPECTED_FOTS_FAILURE (prod-ValidateExpr validate-as-105 0) | 956 | EXPECTED_FOTS_FAILURE (prod-ValidateExpr validate-as-105 0) |
77 | 994 | EXPECTED_FOTS_FAILURE (prod-ValidateExpr validate-as-106 0) | 957 | EXPECTED_FOTS_FAILURE (prod-ValidateExpr validate-as-106 0) |
78 | 995 | EXPECTED_FOTS_FAILURE (prod-VarDecl.external K2-ExternalVariablesWithout-18 0) | 958 | EXPECTED_FOTS_FAILURE (prod-VarDecl.external K2-ExternalVariablesWithout-18 0) |
79 | 996 | EXPECTED_FOTS_FAILURE (prod-VarDecl.external extvardeclwithtype-23 0) | ||
80 | 997 | EXPECTED_FOTS_FAILURE (prod-VarDecl.external K2-ExternalVariablesWith-22 0) | 959 | EXPECTED_FOTS_FAILURE (prod-VarDecl.external K2-ExternalVariablesWith-22 0) |
81 | 998 | EXPECTED_FOTS_FAILURE (prod-VarDefaultValue extvardef-003a 0) | 960 | EXPECTED_FOTS_FAILURE (prod-VarDefaultValue extvardef-003a 0) |
82 | 999 | EXPECTED_FOTS_FAILURE (prod-VarDefaultValue extvardef-006b 0) | 961 | EXPECTED_FOTS_FAILURE (prod-VarDefaultValue extvardef-006b 0) |
83 | 1000 | 962 | ||
84 | === modified file 'test/fots_driver/evaluate.xq' | |||
85 | --- test/fots_driver/evaluate.xq 2013-02-22 07:31:48 +0000 | |||
86 | +++ test/fots_driver/evaluate.xq 2013-02-25 16:22:31 +0000 | |||
87 | @@ -51,17 +51,21 @@ | |||
88 | 51 | : Checks if the result matches the assertions. | 51 | : Checks if the result matches the assertions. |
89 | 52 | : @param $result actual result. | 52 | : @param $result actual result. |
90 | 53 | : @param $expResult expected result. | 53 | : @param $expResult expected result. |
91 | 54 | : @param $testSetBaseURI the URI of the directory that contains the file of the | ||
92 | 55 | associated test set. | ||
93 | 54 | : @return the results of assertion evaluations. | 56 | : @return the results of assertion evaluations. |
94 | 55 | :) | 57 | :) |
95 | 56 | declare %ann:sequential function eval:result( | 58 | declare %ann:sequential function eval:result( |
98 | 57 | $result as item()*, | 59 | $result as item()*, |
99 | 58 | $expResult as element() | 60 | $expResult as element(), |
100 | 61 | $testSetBaseURI as xs:anyURI | ||
101 | 59 | ) as element()* | 62 | ) as element()* |
102 | 60 | { | 63 | { |
103 | 61 | let $err := eval:check-assertion($result, | 64 | let $err := eval:check-assertion($result, |
104 | 62 | $expResult, | 65 | $expResult, |
105 | 63 | (), | 66 | (), |
107 | 64 | "") | 67 | "", |
108 | 68 | $testSetBaseURI) | ||
109 | 65 | return if (empty($err)) | 69 | return if (empty($err)) |
110 | 66 | then () | 70 | then () |
111 | 67 | else | 71 | else |
112 | @@ -78,20 +82,24 @@ | |||
113 | 78 | : @param $expResult expected result. | 82 | : @param $expResult expected result. |
114 | 79 | : @param $code err:code. | 83 | : @param $code err:code. |
115 | 80 | : @param $errorDescription err:description. | 84 | : @param $errorDescription err:description. |
116 | 85 | : @param $testSetBaseURI the URI of the directory that contains the file of the | ||
117 | 86 | associated test set. | ||
118 | 81 | : @return the results of error evaluation. | 87 | : @return the results of error evaluation. |
119 | 82 | :) | 88 | :) |
120 | 83 | declare %ann:sequential function eval:error( | 89 | declare %ann:sequential function eval:error( |
121 | 84 | $result as item()*, | 90 | $result as item()*, |
122 | 85 | $expResult as element(), | 91 | $expResult as element(), |
123 | 86 | $code as xs:QName?, | 92 | $code as xs:QName?, |
125 | 87 | $errorDescription as xs:string? | 93 | $errorDescription as xs:string?, |
126 | 94 | $testSetBaseURI as xs:anyURI | ||
127 | 88 | ) as element()* | 95 | ) as element()* |
128 | 89 | { | 96 | { |
129 | 90 | if (empty($result)) | 97 | if (empty($result)) |
130 | 91 | then | 98 | then |
131 | 92 | let $err := eval:error-code($code, | 99 | let $err := eval:error-code($code, |
132 | 93 | $errorDescription, | 100 | $errorDescription, |
134 | 94 | $expResult) | 101 | $expResult, |
135 | 102 | $testSetBaseURI) | ||
136 | 95 | return | 103 | return |
137 | 96 | if (empty($err)) | 104 | if (empty($err)) |
138 | 97 | then () | 105 | then () |
139 | @@ -114,7 +122,8 @@ | |||
140 | 114 | declare %private %ann:sequential function eval:error-code( | 122 | declare %private %ann:sequential function eval:error-code( |
141 | 115 | $code as xs:QName?, | 123 | $code as xs:QName?, |
142 | 116 | $errorDescription as xs:string?, | 124 | $errorDescription as xs:string?, |
144 | 117 | $expResult as element() | 125 | $expResult as element(), |
145 | 126 | $testSetBaseURI as xs:anyURI | ||
146 | 118 | ) as xs:string* | 127 | ) as xs:string* |
147 | 119 | { | 128 | { |
148 | 120 | let $assertName := local-name($expResult) | 129 | let $assertName := local-name($expResult) |
149 | @@ -136,7 +145,8 @@ | |||
150 | 136 | then eval:check-assertion((), | 145 | then eval:check-assertion((), |
151 | 137 | $expResult, | 146 | $expResult, |
152 | 138 | $code, | 147 | $code, |
154 | 139 | $errorDescription) | 148 | $errorDescription, |
155 | 149 | $testSetBaseURI) | ||
156 | 140 | else concat("Expected result, found error ", | 150 | else concat("Expected result, found error ", |
157 | 141 | local-name-from-QName($code), | 151 | local-name-from-QName($code), |
158 | 142 | " - ", | 152 | " - ", |
159 | @@ -147,7 +157,8 @@ | |||
160 | 147 | $result as item()*, | 157 | $result as item()*, |
161 | 148 | $expResult as element(), | 158 | $expResult as element(), |
162 | 149 | $code as xs:QName?, | 159 | $code as xs:QName?, |
164 | 150 | $errorDescription as xs:string? | 160 | $errorDescription as xs:string?, |
165 | 161 | $testSetBaseURI as xs:anyURI | ||
166 | 151 | ) as xs:string* | 162 | ) as xs:string* |
167 | 152 | { | 163 | { |
168 | 153 | let $test := local-name($expResult) | 164 | let $test := local-name($expResult) |
169 | @@ -156,12 +167,14 @@ | |||
170 | 156 | return eval:assert-all-of($result, | 167 | return eval:assert-all-of($result, |
171 | 157 | $expResult, | 168 | $expResult, |
172 | 158 | $code, | 169 | $code, |
174 | 159 | $errorDescription) | 170 | $errorDescription, |
175 | 171 | $testSetBaseURI) | ||
176 | 160 | case 'any-of' | 172 | case 'any-of' |
177 | 161 | return eval:assert-any-of($result, | 173 | return eval:assert-any-of($result, |
178 | 162 | $expResult, | 174 | $expResult, |
179 | 163 | $code, | 175 | $code, |
181 | 164 | $errorDescription) | 176 | $errorDescription, |
182 | 177 | $testSetBaseURI) | ||
183 | 165 | case 'assert' | 178 | case 'assert' |
184 | 166 | return eval:assert($result, | 179 | return eval:assert($result, |
185 | 167 | $expResult) | 180 | $expResult) |
186 | @@ -183,10 +196,12 @@ | |||
187 | 183 | $expResult) | 196 | $expResult) |
188 | 184 | case 'assert-xml' | 197 | case 'assert-xml' |
189 | 185 | return eval:assert-xml($result, | 198 | return eval:assert-xml($result, |
191 | 186 | $expResult) | 199 | $expResult, |
192 | 200 | $testSetBaseURI) | ||
193 | 187 | case 'assert-serialization-error' | 201 | case 'assert-serialization-error' |
194 | 188 | return eval:assert-serialization-error($result, | 202 | return eval:assert-serialization-error($result, |
196 | 189 | $expResult) | 203 | $expResult, |
197 | 204 | $testSetBaseURI) | ||
198 | 190 | case 'assert-string-value' | 205 | case 'assert-string-value' |
199 | 191 | return eval:assert-string-value($result, | 206 | return eval:assert-string-value($result, |
200 | 192 | $expResult) | 207 | $expResult) |
201 | @@ -202,7 +217,8 @@ | |||
202 | 202 | return eval:error($result, | 217 | return eval:error($result, |
203 | 203 | $expResult, | 218 | $expResult, |
204 | 204 | $code, | 219 | $code, |
206 | 205 | $errorDescription) | 220 | $errorDescription, |
207 | 221 | $testSetBaseURI) | ||
208 | 206 | default | 222 | default |
209 | 207 | return error($fots-err:errNA, | 223 | return error($fots-err:errNA, |
210 | 208 | "
The requested assertion type is not implemented.") | 224 | "
The requested assertion type is not implemented.") |
211 | @@ -213,7 +229,8 @@ | |||
212 | 213 | $result as item()*, | 229 | $result as item()*, |
213 | 214 | $expResult as element(), | 230 | $expResult as element(), |
214 | 215 | $code as xs:QName?, | 231 | $code as xs:QName?, |
216 | 216 | $errorDescription as xs:string? | 232 | $errorDescription as xs:string?, |
217 | 233 | $baseURI as xs:anyURI | ||
218 | 217 | ) as xs:string? | 234 | ) as xs:string? |
219 | 218 | { | 235 | { |
220 | 219 | let $results := | 236 | let $results := |
221 | @@ -222,7 +239,8 @@ | |||
222 | 222 | for $r in eval:check-assertion($result, | 239 | for $r in eval:check-assertion($result, |
223 | 223 | $tmp, | 240 | $tmp, |
224 | 224 | $code, | 241 | $code, |
226 | 225 | $errorDescription) | 242 | $errorDescription, |
227 | 243 | $baseURI) | ||
228 | 226 | return <item>{$r}</item> | 244 | return <item>{$r}</item> |
229 | 227 | } </result> | 245 | } </result> |
230 | 228 | where every $result in $results satisfies $result/item | 246 | where every $result in $results satisfies $result/item |
231 | @@ -235,14 +253,16 @@ | |||
232 | 235 | $result as item()*, | 253 | $result as item()*, |
233 | 236 | $expResult as element(), | 254 | $expResult as element(), |
234 | 237 | $code as xs:QName?, | 255 | $code as xs:QName?, |
236 | 238 | $errorDescription as xs:string? | 256 | $errorDescription as xs:string?, |
237 | 257 | $baseURI as xs:anyURI | ||
238 | 239 | ) as xs:string* | 258 | ) as xs:string* |
239 | 240 | { | 259 | { |
240 | 241 | for $tmp in $expResult/* | 260 | for $tmp in $expResult/* |
241 | 242 | return eval:check-assertion($result, | 261 | return eval:check-assertion($result, |
242 | 243 | $tmp, | 262 | $tmp, |
243 | 244 | $code, | 263 | $code, |
245 | 245 | $errorDescription) | 264 | $errorDescription, |
246 | 265 | $baseURI) | ||
247 | 246 | }; | 266 | }; |
248 | 247 | 267 | ||
249 | 248 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert :) | 268 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert :) |
250 | @@ -417,17 +437,19 @@ | |||
251 | 417 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert-xml :) | 437 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert-xml :) |
252 | 418 | declare %private function eval:assert-xml( | 438 | declare %private function eval:assert-xml( |
253 | 419 | $result as item()*, | 439 | $result as item()*, |
255 | 420 | $expResult as element() | 440 | $expResult as element(), |
256 | 441 | $baseURI as xs:anyURI | ||
257 | 421 | ) | 442 | ) |
258 | 422 | { | 443 | { |
259 | 423 | (:TODO call xml-canonicalization after bug #1076919 is implemented.:) | 444 | (:TODO call xml-canonicalization after bug #1076919 is implemented.:) |
260 | 424 | try { | 445 | try { |
261 | 425 | let $serRes := util:serialize-result($result), | 446 | let $serRes := util:serialize-result($result), |
262 | 426 | $result1 as xs:string := string-join($serRes,''), | 447 | $result1 as xs:string := string-join($serRes,''), |
264 | 427 | $result2 as xs:string := string-join($serRes,' ') | 448 | $result2 as xs:string := string-join($serRes,' '), |
265 | 449 | $expectedResult as xs:string := util:get-value($expResult, $baseURI, "assert-xml") | ||
266 | 428 | return | 450 | return |
269 | 429 | if ((normalize-space($result1) eq normalize-space(string($expResult))) or | 451 | if ((normalize-space($result1) eq normalize-space(string($expectedResult))) or |
270 | 430 | (normalize-space($result2) eq normalize-space(string($expResult)))) | 452 | (normalize-space($result2) eq normalize-space(string($expectedResult)))) |
271 | 431 | then () | 453 | then () |
272 | 432 | else "'assert-xml' returned: result is different from the expected result." | 454 | else "'assert-xml' returned: result is different from the expected result." |
273 | 433 | } catch * { | 455 | } catch * { |
274 | @@ -439,7 +461,9 @@ | |||
275 | 439 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert-serialization-error :) | 461 | (: http://dev.w3.org/2011/QT3-test-suite/catalog-schema.html#elem_assert-serialization-error :) |
276 | 440 | declare %private %ann:sequential function eval:assert-serialization-error( | 462 | declare %private %ann:sequential function eval:assert-serialization-error( |
277 | 441 | $result as item()*, | 463 | $result as item()*, |
279 | 442 | $expResult as element() | 464 | $expResult as element(), |
280 | 465 | $baseURI as xs:anyURI | ||
281 | 466 | |||
282 | 443 | ) as xs:string? | 467 | ) as xs:string? |
283 | 444 | { | 468 | { |
284 | 445 | try { | 469 | try { |
285 | @@ -451,7 +475,8 @@ | |||
286 | 451 | eval:error((), | 475 | eval:error((), |
287 | 452 | $expResult, | 476 | $expResult, |
288 | 453 | $err:code, | 477 | $err:code, |
290 | 454 | $err:description) | 478 | $err:description, |
291 | 479 | $baseURI) | ||
292 | 455 | } | 480 | } |
293 | 456 | }; | 481 | }; |
294 | 457 | 482 | ||
295 | 458 | 483 | ||
296 | === modified file 'test/fots_driver/fots-driver.xq' | |||
297 | --- test/fots_driver/fots-driver.xq 2013-02-22 10:41:13 +0000 | |||
298 | +++ test/fots_driver/fots-driver.xq 2013-02-25 16:22:31 +0000 | |||
299 | @@ -872,7 +872,8 @@ | |||
300 | 872 | eval:error((), | 872 | eval:error((), |
301 | 873 | $case/fots:result/*, | 873 | $case/fots:result/*, |
302 | 874 | $err:code, | 874 | $err:code, |
304 | 875 | $err:description), | 875 | $err:description, |
305 | 876 | $testSetBaseURI), | ||
306 | 876 | "fots-driver.xq:driver:test catch", | 877 | "fots-driver.xq:driver:test catch", |
307 | 877 | $testSetName, | 878 | $testSetName, |
308 | 878 | $env, | 879 | $env, |
309 | @@ -1005,12 +1006,9 @@ | |||
310 | 1005 | 1006 | ||
311 | 1006 | variable $queryResult := xqxq:evaluate-sequential($queryKey); | 1007 | variable $queryResult := xqxq:evaluate-sequential($queryKey); |
312 | 1007 | 1008 | ||
313 | 1008 | (:TODO check if this works:) | ||
314 | 1009 | (:variable $expResult := util:get-value($case, $testSetBaseURI, "result");:) | ||
315 | 1010 | |||
316 | 1011 | xqxq:delete-query($queryKey); | 1009 | xqxq:delete-query($queryKey); |
317 | 1012 | 1010 | ||
319 | 1013 | eval:result($queryResult, $case/fots:result/*) | 1011 | eval:result($queryResult, $case/fots:result/*, $testSetBaseURI) |
320 | 1014 | } | 1012 | } |
321 | 1015 | } | 1013 | } |
322 | 1016 | catch * | 1014 | catch * |
323 | @@ -1018,6 +1016,7 @@ | |||
324 | 1018 | eval:error((), | 1016 | eval:error((), |
325 | 1019 | $case/fots:result/*, | 1017 | $case/fots:result/*, |
326 | 1020 | $err:code, | 1018 | $err:code, |
328 | 1021 | $err:description) | 1019 | $err:description, |
329 | 1020 | $testSetBaseURI) | ||
330 | 1022 | } | 1021 | } |
331 | 1023 | }; | 1022 | }; |
332 | 1024 | 1023 | ||
333 | === added file 'test/fots_driver/tools/list_node_names_with_file_attribute.xq' | |||
334 | --- test/fots_driver/tools/list_node_names_with_file_attribute.xq 1970-01-01 00:00:00 +0000 | |||
335 | +++ test/fots_driver/tools/list_node_names_with_file_attribute.xq 2013-02-25 16:22:31 +0000 | |||
336 | @@ -0,0 +1,45 @@ | |||
337 | 1 | (: | ||
338 | 2 | : Copyright 2006-2011 The FLWOR Foundation. | ||
339 | 3 | : | ||
340 | 4 | : Licensed under the Apache License, Version 2.0 (the "License"); | ||
341 | 5 | : you may not use this file except in compliance with the License. | ||
342 | 6 | : You may obtain a copy of the License at | ||
343 | 7 | : | ||
344 | 8 | : http://www.apache.org/licenses/LICENSE-2.0 | ||
345 | 9 | : | ||
346 | 10 | : Unless required by applicable law or agreed to in writing, software | ||
347 | 11 | : distributed under the License is distributed on an "AS IS" BASIS, | ||
348 | 12 | : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
349 | 13 | : See the License for the specific language governing permissions and | ||
350 | 14 | : limitations under the License. | ||
351 | 15 | :) | ||
352 | 16 | |||
353 | 17 | (:~ | ||
354 | 18 | : list all node-names of the nodes that contain a child with a 'file' attribute. | ||
355 | 19 | : At the moment this is the list: "source", "schema", "assert-xml", "module", "test" | ||
356 | 20 | : | ||
357 | 21 | : @author Sorin Nasoi | ||
358 | 22 | :) | ||
359 | 23 | |||
360 | 24 | import module namespace util = | ||
361 | 25 | "http://www.zorba-xquery.com/fots-driver/util" at "../util.xq"; | ||
362 | 26 | |||
363 | 27 | declare namespace fots = | ||
364 | 28 | "http://www.w3.org/2010/09/qt-fots-catalog"; | ||
365 | 29 | |||
366 | 30 | let $fotsPath := "../../../build/test/fots/2011/QT3-test-suite/catalog.xml" | ||
367 | 31 | let $doc := doc(resolve-uri($fotsPath)) | ||
368 | 32 | let $baseUri:= resolve-uri(util:parent-folder($fotsPath)) | ||
369 | 33 | return | ||
370 | 34 | distinct-values( | ||
371 | 35 | for $testSet in $doc/fots:catalog/fots:test-set | ||
372 | 36 | let $testSetDoc := doc(resolve-uri($testSet/@file, $baseUri)) | ||
373 | 37 | let $testSetName := xs:string($testSet/@name) | ||
374 | 38 | return | ||
375 | 39 | distinct-values(for $case in $testSetDoc//fots:test-case | ||
376 | 40 | return distinct-values(for $node in $case/descendant-or-self::* | ||
377 | 41 | where exists($node/@file) | ||
378 | 42 | return local-name-from-QName(node-name($node)) | ||
379 | 43 | ) | ||
380 | 44 | ) | ||
381 | 45 | ) | ||
382 | 0 | 46 | ||
383 | === modified file 'test/fots_driver/tools/process.xq' | |||
384 | --- test/fots_driver/tools/process.xq 2012-12-18 14:13:20 +0000 | |||
385 | +++ test/fots_driver/tools/process.xq 2013-02-25 16:22:31 +0000 | |||
386 | @@ -36,7 +36,8 @@ | |||
387 | 36 | declare namespace fots = | 36 | declare namespace fots = |
388 | 37 | "http://www.w3.org/2010/09/qt-fots-catalog"; | 37 | "http://www.w3.org/2010/09/qt-fots-catalog"; |
389 | 38 | 38 | ||
391 | 39 | declare variable $fotsPath as xs:string external := ""; | 39 | declare variable $fotsPath as xs:string external := |
392 | 40 | "../../../build/test/fots/2011/QT3-test-suite/catalog.xml"; | ||
393 | 40 | declare variable $dependency as xs:string external := ""; | 41 | declare variable $dependency as xs:string external := ""; |
394 | 41 | declare variable $testSetPrefixes as xs:string external := ""; | 42 | declare variable $testSetPrefixes as xs:string external := ""; |
395 | 42 | 43 | ||
396 | 43 | 44 | ||
397 | === modified file 'test/fots_driver/util.xq' | |||
398 | --- test/fots_driver/util.xq 2013-02-19 14:06:08 +0000 | |||
399 | +++ test/fots_driver/util.xq 2013-02-25 16:22:31 +0000 | |||
400 | @@ -71,24 +71,24 @@ | |||
401 | 71 | : or | 71 | : or |
402 | 72 | : (b) the typed value of the node (assuming it is promotable to string). | 72 | : (b) the typed value of the node (assuming it is promotable to string). |
403 | 73 | : | 73 | : |
405 | 74 | : @param $case test-case element. | 74 | : @param $parentNode |
406 | 75 | : @param $baseURI | ||
407 | 75 | : @param $node-name | 76 | : @param $node-name |
410 | 76 | : @param $envBaseURI | 77 | : @return the content of the node with name 'node-name'. |
409 | 77 | : @return the query text. | ||
411 | 78 | :) | 78 | :) |
412 | 79 | declare %ann:nondeterministic function util:get-value( | 79 | declare %ann:nondeterministic function util:get-value( |
415 | 80 | $case as element(fots:test-case), | 80 | $parentNode as element(), |
416 | 81 | $envBaseURI as xs:anyURI, | 81 | $baseURI as xs:anyURI, |
417 | 82 | $node-name as xs:string | 82 | $node-name as xs:string |
418 | 83 | ) as xs:string | 83 | ) as xs:string |
419 | 84 | { | 84 | { |
420 | 85 | try | 85 | try |
421 | 86 | { | 86 | { |
423 | 87 | for $node in $case/descendant-or-self::* | 87 | for $node in $parentNode/descendant-or-self::* |
424 | 88 | where (fn:local-name-from-QName(fn:node-name($node)) eq $node-name) | 88 | where (fn:local-name-from-QName(fn:node-name($node)) eq $node-name) |
425 | 89 | return | 89 | return |
426 | 90 | if ($node/@file) | 90 | if ($node/@file) |
428 | 91 | then fn:unparsed-text(resolve-uri($node/@file, $envBaseURI)) | 91 | then fn:unparsed-text(resolve-uri($node/@file, $baseURI)) |
429 | 92 | else fn:string($node) | 92 | else fn:string($node) |
430 | 93 | } | 93 | } |
431 | 94 | catch * | 94 | catch * |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ fix_assert_ xml-2013- 02-25T15- 49-41.664Z/ log.html
Log at: http://