Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discrepancies between the QT4 tests and the Working Draft QT4 XPath spec. #82

Open
johnlumley opened this issue Mar 13, 2024 · 16 comments

Comments

@johnlumley
Copy link

In working on testing a generator of an iXML grammar for XPath 4, I have uncovered a few cases where the test suite contains tests for features that have been proposed but do not yet appear in the working draft of the spec. This issue is to record what these are:

for key & for value iteration across maps.

The test set ForClause.map.xml contains tests for the proposed iteration constructs across maps Extend FLWOR expressions to maps, where the proposed alterations to the XPath EBNF (and indeed description) do not appear in the current working draft XPath spec. Moreover the additional tests are not mentioned in the current changes.xml record, though the addition of tests for for member array iteration is.

@michaelhkay
Copy link
Contributor

Thanks. We've resolved that in future, tests created in anticipation of a change to the spec will be submitted as a PR and only merged in when the spec change is made. Meanwhile there will be cases where the tests are ahead of the spec or vice versa. Similarly, we're hoping to get the changes.xml mechanism into better shape.

@ChristianGruen
Copy link
Contributor

@johnlumley Thanks as well; I have moved those tests out of the test suite into a PR yesterday (#81).

Feel free to keep us updated about other inconsistencies.

@johnlumley
Copy link
Author

johnlumley commented Mar 13, 2024

I may as well use this issue to record other inconsistencies I find in the test suites. Here goes:

Missing XQuery dependencies

The following 7 (seven) test cases in test set prod-DynamicFunctionCall lack a declaration of dependency on XQuery: DynamicFunctionCall-004/-014/-023/-024/-R-004/-R-014/-R-024

(Corrected from original: -R-081 and -R-086 are not XQuery dependent.)

@johnlumley
Copy link
Author

Additional missing XQuery dependency declarations are on the following 7 test cases:
string-template-910/-0911/-0913/-0914/-0915/-0917/-0918

@ChristianGruen
Copy link
Contributor

@johnlumley Do you want me to add the dependencies, or are you already working on it?

@johnlumley
Copy link
Author

@ChristianGruen - I'd prefer you to manage the dependencies - my GIT-experience is limited and I fear mistakes!

@ChristianGruen
Copy link
Contributor

@ChristianGruen - I'd prefer you to manage the dependencies - my GIT-experience is limited and I fear mistakes!

I’ve just added the dependency declarations; I hope I haven’t overlooked anything.

@johnlumley
Copy link
Author

johnlumley commented Mar 21, 2024

Just checking some more from my last test run!

More missing XQuery dependency declarations are on the following 12 test cases:
fo-test-fn-count-001 fo-test-fn-every-010 fo-test-fn-hash-006/7 fo-test-fn-json-006/7/8/9 fo-test-map-build-006 fo-test-fn-sort-with-005
K-SeqDeepEqualFunc-3 eqname-904

(eqname-904 incorrectly describes an XP30+ dependency.)

@ChristianGruen
Copy link
Contributor

ChristianGruen commented Mar 21, 2024

K-SeqDeepEqualFunc-3 eqname-904

I’ve fixed the two.

fo-test-fn-count-001 fo-test-fn-every-010 fo-test-fn-hash-006/7 fo-test-fn-json-006/7/8/9 fo-test-map-build-006 fo-test-fn-sort-with-005

@michaelhkay may need to judge how to tackle those ones (they are generated).

@johnlumley
Copy link
Author

johnlumley commented Mar 21, 2024

Sorry to drip feed. A few more:
hof-907 and hof-907a and
fo-test-fn-function-annotations-001/2/3
also incorrectly permit XP execution or require an XQuery dependency.

@johnlumley
Copy link
Author

johnlumley commented Mar 21, 2024

cbcl-min-012a/-009a/-010a and cbcl-distinct-values-002c all permit XPath but use declare function

ChristianGruen added a commit that referenced this issue Mar 23, 2024
@ChristianGruen
Copy link
Contributor

hof-907 and hof-907a and fo-test-fn-function-annotations-001/2/3 also incorrectly permit XP execution or require an XQuery dependency.
cbcl-min-012a/-009a/-010a and cbcl-distinct-values-002c all permit XPath but use declare function

Fixed. In addition, XP40 and XQ40 should always be XP40+ and XQ40+ (the world will soon be waiting for XPath 4.1 ff…).

@ChristianGruen
Copy link
Contributor

Apart from the error caused by the generated tests, all other test cases should haven been fixed.

@ChristianGruen
Copy link
Contributor

@johnlumley Maybe we can close this issue and look at the generated tests in a separate issue. What do you think?

@johnlumley
Copy link
Author

johnlumley commented Sep 14, 2024

Additional Missing XQuery dependencies

More missing XQuery dependency declarations in the test suite as at 2024sep14 are on the following 13 test cases:

highest-004 
function-call-reserved-function-names-007a 
fo-test-fn-hash-009, fo-test-fn-hash-010
fo-test-fn-count-001
fo-test-fn-function-annotations-002, fo-test-fn-function-annotations-003, fo-test-fn-function-annotations-004
fo-test-fn-sort-with-00
fo-test-map-build-007
fo-test-fn-every-010
fo-test-fn-load-xquery-module-001
fo-test-fn-serialize-004

@johnlumley
Copy link
Author

Error in QuantifiedExpr tests

K-QuantExprWith-29 and K-QuantExprWith-30 contain the expression:

some|every $a as xs:date as current-date()[year-from-date(.) lt 2000] 
         satisfies $a eq 12

which fails to parse. The second as should I think be in. The tests succeed because they have an option to succeed or fail dependent upon the date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants