forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#95933 - Urgau:rustdoc-htmldocck-tree-compar…
…e, r=GuillaumeGomez htmldocck: Compare HTML tree instead of plain text html This PR improves `htmldocck` by comparing HTML trees instead of plain text html in the case of doing a ``@snapshot`` test. This fix the [CI issue](https://github.com/rust-lang-ci/rust/runs/5964305020?check_suite_focus=true) encounter in rust-lang#95813 where for some unknown reason one of the attributes is not always at the same place. The code is largely based on https://github.com/formencode/formencode/blob/3a1ba9de2fdd494dd945510a4568a3afeddb0b2e/formencode/doctest_xml_compare.py#L72-L120 which is behind MIT License. The comparison function is straightforward except for the `text_compare` function which does some weird stuff that we may want to simply reduce to a plain old comparison. r? `@GuillaumeGomez`
- Loading branch information
Showing
1 changed file
with
66 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters