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

Tests for rustdoc outputs #19723

Closed
lifthrasiir opened this issue Dec 11, 2014 · 3 comments
Closed

Tests for rustdoc outputs #19723

lifthrasiir opened this issue Dec 11, 2014 · 3 comments
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@lifthrasiir
Copy link
Contributor

We already have a heap of various rustdoc bugs, most of them are reported and verified by hand. We need a good facility to test rustdoc outputs with the expected output. For example, the "expected output" might be a set of expected files and expected set of strings to appear from each file.

A superset of #13444.

@tomjakubowski
Copy link
Contributor

There are a few handwritten tests like this in run-make, like https://github.com/rust-lang/rust/tree/master/src/test/run-make/rustdoc-where and https://github.com/rust-lang/rust/tree/master/src/test/run-make/rustdoc-search-index but good coverage isn't there and it's somewhat awkward writing them.

@Gankra Gankra added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Jan 8, 2015
@tomjakubowski
Copy link
Contributor

Since most rustdoc bugs seem to be in clean and clean::inline, it might be worth adding some unit tests for those at least. It could be tricky to produce fixture data for inlined docs though, which tend to cause the most headaches.

lifthrasiir added a commit to lifthrasiir/rust that referenced this issue Jan 17, 2015
The script is intended as a tool for doing every sort of verifications
amenable to Rustdoc's HTML output. For example, link checkers would go
to this script. It already parses HTML into a document tree form (with
a slight caveat), so future tests can make use of it.

As an example, relevant `rustdoc-*` run-make tests have been updated
to use `htmldocck.py` and got their `verify.sh` removed. In the future
they may go to a dedicated directory with htmldocck running by default.
The detailed explanation of test scripts is provided as a docstring of
htmldocck.

cc rust-lang#19723
bors added a commit that referenced this issue Jan 20, 2015
The script is intended as a tool for doing every sort of verifications amenable to Rustdoc's HTML output. For example, link checkers would go to this script. It already parses HTML into a document tree form (with a slight caveat), so future tests can make use of it.

As an example, relevant `rustdoc-*` run-make tests have been updated to use `htmldocck.py` and got their `verify.sh` removed. In the future they may go to a dedicated directory with htmldocck running by default. The detailed explanation of test scripts is provided as a docstring of htmldocck.

cc #19723
@alexcrichton
Copy link
Member

With htmldockck this is basically done. Awesome work again @lifthrasiir!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants