qt4cg / qt4tests

QT4 tests
https://qt4cg.org/
3 stars 7 forks source link

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

Open johnlumley opened 3 months ago

johnlumley commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

@johnlumley Thanks as well; I have moved those tests out of the test suite into a PR yesterday (https://github.com/qt4cg/qt4tests/pull/81).

Feel free to keep us updated about other inconsistencies.

johnlumley commented 3 months ago

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 commented 3 months ago

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

ChristianGruen commented 3 months ago

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

johnlumley commented 3 months ago

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

ChristianGruen commented 3 months ago

@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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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 commented 3 months ago

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

ChristianGruen commented 3 months ago

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 commented 2 months ago

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