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

Add conformance tests #749

Open
Mingun opened this issue May 27, 2024 · 1 comment
Open

Add conformance tests #749

Mingun opened this issue May 27, 2024 · 1 comment

Comments

@Mingun
Copy link
Collaborator

Mingun commented May 27, 2024

The official test suite is located at https://www.w3.org/XML/Test/. The all links from that page or found by references from that page:

There also exist W3C XML Schema 1.1 (XSD 1.1) test suite, maybe would be useful: https://github.com/w3c/xsdtests

The preferred implementation should automatically download test suite if it does not exist locally and run tests. We also could have a copy as a submodule in our repository. I prefer to use default Rust tools, i.e. cargo test. Test could be implemented in a separated crate to not slow down everyday workflow.

@Mingun
Copy link
Collaborator Author

Mingun commented Jun 4, 2024

Some intermediate results of investigation:

  1. The official conformance testsuite has very low quality: many repeated tests, weak structure, has errors (file with "pass" in name marked as "invalid", but comment say that it is valid)
  2. Found bug in quick-xml (Fix processing instruction parsing #753): we end processing instruction after the first > even if there is no ? before it. Actually, we produce an error in that case. We should continue search of ?> until EOF is reached.
  3. Processing instructions:
    • continued to the first ?> which cannot be escaped
    • any parameter entities (%name;) or general entities (&name;) are not recognized
    • character references (&#...;) are not recognized
    • no characters has special meaning. In particular, ' and " does nothing and no need to be paired
    • literal characters restricted in XML still forbidden. So you can write � (which is just string "�"), but cannot use character U+0000

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

No branches or pull requests

1 participant