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

htmldocck: Don't silently ignore !@has comments #80570

Closed
camelid opened this issue Jan 1, 2021 · 0 comments · Fixed by #80617
Closed

htmldocck: Don't silently ignore !@has comments #80570

camelid opened this issue Jan 1, 2021 · 0 comments · Fixed by #80617
Assignees
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Jan 1, 2021

Currently, htmldocck (the script that runs src/test/rustdoc tests) has two
primary test assertions: @has and @!has. @has checks for the presence of
text in tags selected with an XPath selector. @!has does the same, except it
checks for the absence of text. However, it is very easy to write !@has
instead of @!has by mistake (see #80565 for an example of some tests that used
!@has and had to be fixed), but !@has will be silently ignored by htmldocck.
Instead, htmldocck should either accept !@has or error out and cause the test
to fail. Otherwise, it's confusing to people who are new to htmldocck and, even
worse, we will likely end up with tests that have silently-ignored assertions.

cc @GuillaumeGomez

@camelid camelid added A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. C-bug Category: This is a bug. labels Jan 1, 2021
@GuillaumeGomez GuillaumeGomez self-assigned this Jan 2, 2021
@bors bors closed this as completed in fd0dbac Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-contributor-roadblock Area: Makes things more difficult for new contributors to rust itself A-testsuite Area: The testsuite used to check the correctness of rustc C-bug Category: This is a bug. C-enhancement Category: An issue proposing an enhancement or a PR with one. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants