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

Spec compliance testing #14

Merged
merged 5 commits into from
Mar 23, 2023
Merged

Spec compliance testing #14

merged 5 commits into from
Mar 23, 2023

Conversation

thekid
Copy link
Member

@thekid thekid commented Aug 9, 2019

This pull request adds the infrastructure for running the CommonMark spec tests.

$ curl -sSL https://github.com/commonmark/commonmark-spec/raw/master/spec.txt > spec.txt
# ...

$ xp test src/it/php/ --spec=spec.txt
# ...

Test cases:  121 succeeded, 530 failed
Memory used: 5783.13 kB (7357.30 kB peak)
Time taken:  0.096 seconds (0.411 seconds overall)

Lots of TODOs 🙃

@thekid thekid changed the title Spec compliance Spec compliance testing Aug 9, 2019
@thekid
Copy link
Member Author

thekid commented Mar 23, 2023

#17 is merged, fixing two tests

@thekid
Copy link
Member Author

thekid commented Mar 23, 2023

After some small adjustments we now have:

Test cases:  126 succeeded, 525 failed
Memory used: 5780.15 kB (7324.12 kB peak)
Time taken:  0.074 seconds (0.385 seconds overall)

Scanning through these lots of them seem to be related to:

  • Whitespace handling and emitting (like <ul>\n<li> vs. <ul><li>)
  • HTML support (we don't have it!)
  • URL encoding
  • Support for explicit links (via <link>)
  • Escaping via backslashes

@thekid
Copy link
Member Author

thekid commented Mar 23, 2023

Will merge this (but not add it to the test suite) in order to iteratively reach more spec compliance

@thekid thekid merged commit 1d0de0e into master Mar 23, 2023
@thekid thekid deleted the spec branch March 23, 2023 19:51
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

Successfully merging this pull request may close these issues.

1 participant