-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Description
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.
Metadata
Metadata
Assignees
Labels
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustArea: Makes things more difficult for new or seasoned contributors to RustA-testsuiteArea: The testsuite used to check the correctness of rustcArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.Category: This is a bug.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.