htmldocck: Don't silently ignore !@has
comments
#80570
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.
Currently, htmldocck (the script that runs
src/test/rustdoc
tests) has twoprimary test assertions:
@has
and@!has
.@has
checks for the presence oftext in tags selected with an XPath selector.
@!has
does the same, except itchecks 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 testto 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
The text was updated successfully, but these errors were encountered: