-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
rustdoc: fix up old test #122355
rustdoc: fix up old test #122355
Conversation
@@ -694,7 +694,6 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ | |||
"check-stdout", | |||
"check-test-line-numbers-match", | |||
"compile-flags", | |||
"count", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I must have assumed it was a valid directive too...
U::Output: Display + Copy | ||
// @matches foo/fn.where_clause.html '//*[@class="rust item-decl"]//code' "\ | ||
// where_clause<T, U>\(param_one: T, param_two: U\)where\n\ | ||
// \ T: Add<U> \+ Display \+ Copy,\n\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The \
right before the LF makes htmldocck
dedent the following line, hence the “floating” \
on this line: It stops the dedentation process and “bakes” 4 literal spaces into the string literal whose presence we want to check.
@bors r+ |
…kingjubilee Rollup of 12 pull requests Successful merges: - rust-lang#121754 ([bootstrap] Move the `split-debuginfo` setting to the per-target section) - rust-lang#121953 (Add tests for the generated assembly of mask related simd instructions.) - rust-lang#122081 (validate `builder::PATH_REMAP`) - rust-lang#122245 (Detect truncated DepGraph files) - rust-lang#122354 (bootstrap: Don't eagerly format verbose messages) - rust-lang#122355 (rustdoc: fix up old test) - rust-lang#122363 (tests: Add ui/attributes/unix_sigpipe/unix_sigpipe-str-list.rs) - rust-lang#122366 (Fix stack overflow with recursive associated types) - rust-lang#122377 (Fix discriminant_kind copy paste from the pointee trait case) - rust-lang#122378 (Properly rebuild rustbooks) - rust-lang#122380 (Fix typo in lib.rs of proc_macro) - rust-lang#122381 (llvm-wrapper: adapt for LLVM API changes) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#122355 - fmease:rustdoc-fix-up-old-test, r=notriddle rustdoc: fix up old test `tests/rustdoc/line-breaks.rs` had several issues: 1. It used `//`@count`` instead of `// `@count`` (notice the space!) which gets treated as a `ui_test` directive instead of a `htmldocck` one. `compiletest` didn't flag it as an error because it's allowlisted ([rust-lang#121561](rust-lang#121561)) presumably precisely because of this test. And before the compiletest→ui_test migration, these directives must've been ignored, too, because … 2. … the checks themselves no longer work either: The count of `<br>`s is actually 0 in all 3 cases because – well – we no longer generate any `<br>`s inside `<pre>`s. Since I don't know how to ``@count`` `\n`s instead of `<br>`s, I've turned them into ``@matches`.` Btw, I don't know if this test is still desirable or if we have other tests that cover this (I haven't checked). r? rustdoc
tests/rustdoc/line-breaks.rs
had several issues://@count
instead of// @count
(notice the space!) which gets treated as aui_test
directive instead of ahtmldocck
one.compiletest
didn't flag it as an error because it's allowlisted (#121561) presumably precisely because of this test. And before the compiletest→ui_test migration, these directives must've been ignored, too, because …<br>
s is actually 0 in all 3 cases because – well – we no longer generate any<br>
s inside<pre>
s.Since I don't know how to
@count
\n
s instead of<br>
s, I've turned them into@matches
. Btw, I don't know if this test is still desirable or if we have other tests that cover this (I haven't checked).r? rustdoc