w3c / qt3tests

Tests for XPath and XQuery
27 stars 17 forks source link

Additional tests with last() #52

Closed Twilight-Shuxin closed 1 year ago

Twilight-Shuxin commented 1 year ago

Additional XPath test cases of node selection related to last(), originated from bug reports

Twilight-Shuxin commented 1 year ago

I notice that I try to query a document by using document{}, which doesn't seem to be supported by XPath 1.0. But I don't know how it should be done correctly if I do not add a separate xml file.

ChristianGruen commented 1 year ago

Thanks for spending your valuable time on creating test cases.

One easy solution is to add dependencies to your tests. With the following dependency, a test case will only be run by XQuery processors, 1.0 and later:

<dependency type="spec" value="XQ10+"/>
michaelhkay commented 1 year ago

As well as adding the XQuery dependency, you need to put the test in a CDATA section because it contains angle brackets.

Twilight-Shuxin commented 1 year ago

Lots of thanks for your kind reply! I had modified the test cases and hope it works correctly now.

ChristianGruen commented 1 year ago

Looks good to me (I’ve just run the tests, as I currently have no write access).

Twilight-Shuxin commented 1 year ago

Thanks!