1
Fork 0

Always use a colon in //@ normalize-*: headers

This commit is contained in:
Zalathar 2024-06-21 15:15:36 +10:00
parent 3ad5f459b3
commit 9aaa0c5867
132 changed files with 228 additions and 228 deletions

View file

@ -1,6 +1,6 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
// This test ensures that no code block is detected in the doc comments.

View file

@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test --test-args --test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Crates like core have doctests gated on `cfg(not(test))` so we need to make
// sure `cfg(test)` is not active when running `rustdoc --test`.

View file

@ -2,7 +2,7 @@
//@ compile-flags: --test --nocapture --check-cfg=cfg(feature,values("test")) -Z unstable-options
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// The doctest will produce a warning because feature invalid is unexpected
/// ```

View file

@ -4,7 +4,7 @@
//@ edition:2018
//@ compile-flags:--test --test-args=--show-output
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// #![warn(unused)]

View file

@ -1,7 +1,7 @@
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
//! ```rust

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
/// ```

View file

@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
// Make sure `cfg(doctest)` is set when finding doctests but not inside
// the doctests.

View file

@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
#![feature(doc_cfg)]

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
/// ```

View file

@ -2,7 +2,7 @@
//@ aux-build:extern_macros.rs
//@ compile-flags:--test --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
//! ```

View file

@ -3,7 +3,7 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
/// ```compile_fail

View file

@ -3,7 +3,7 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
/// <https://github.com/rust-lang/rust/issues/91014>

View file

@ -3,7 +3,7 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
/// ```compile_fail,E0004

View file

@ -8,7 +8,7 @@
//@ compile-flags:--test --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
// doctest fails at runtime

View file

@ -8,7 +8,7 @@
//@ compile-flags:--test --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
// doctest fails at runtime

View file

@ -3,7 +3,7 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
/// ```should_panic

View file

@ -3,7 +3,7 @@
//@ check-pass
//@ compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// let a = true;

View file

@ -2,7 +2,7 @@
//@ compile-flags:--test -Zunstable-options --nocapture
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```compile_fail
/// fn foo() {

View file

@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test -Zunstable-options --nocapture
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// println!("hello!");

View file

@ -4,7 +4,7 @@
//@ aux-build:pub_trait.rs
//@ compile-flags: --test --test-args --test-threads=1
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
#![doc(test(attr(deny(non_local_definitions))))]
#![doc(test(attr(allow(dead_code))))]

View file

@ -2,7 +2,7 @@
//@ compile-flags:--test --test-args --test-threads=1 --nocapture -Zunstable-options
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
#![doc(test(attr(warn(non_local_definitions))))]

View file

@ -5,7 +5,7 @@
//@ [correct]compile-flags:--test --test-run-directory={{src-base}}
//@ [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// assert_eq!(

View file

@ -1,6 +1,6 @@
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ check-pass
#![no_std]

View file

@ -1,7 +1,7 @@
//@ compile-flags: --test --test-args=--test-threads=1
//@ check-pass
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
/// ```
/// let a = true;

View file

@ -1,6 +1,6 @@
//@ compile-flags: --test
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
//@ rustc-env: RUST_BACKTRACE=0

View file

@ -4,12 +4,12 @@
//@ error-pattern: aborting due to
//@ error-pattern: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-rustdoc&template=ice.md
//@ normalize-stderr-test "note: compiler flags.*\n\n" -> ""
//@ normalize-stderr-test "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
//@ normalize-stderr-test "thread.*panicked at compiler.*" -> ""
//@ normalize-stderr-test " +\d{1,}: .*\n" -> ""
//@ normalize-stderr-test " + at .*\n" -> ""
//@ normalize-stderr-test ".*note: Some details are omitted.*\n" -> ""
//@ normalize-stderr-test: "note: compiler flags.*\n\n" -> ""
//@ normalize-stderr-test: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
//@ normalize-stderr-test: "thread.*panicked at compiler.*" -> ""
//@ normalize-stderr-test: " +\d{1,}: .*\n" -> ""
//@ normalize-stderr-test: " + at .*\n" -> ""
//@ normalize-stderr-test: ".*note: Some details are omitted.*\n" -> ""
fn wrong()
//~^ ERROR expected one of

View file

@ -1,7 +1,7 @@
//@ check-pass
//@ compile-flags:--test
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
pub fn test() -> Result<(), ()> {
//! ```compile_fail

View file

@ -2,7 +2,7 @@
//@ check-stdout
//@ error-pattern:cannot find function `foo` in this scope
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ failure-status: 101
/// ```rust

View file

@ -2,7 +2,7 @@
//@ aux-build:empty-fn.rs
//@ check-pass
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ edition:2021
/// <https://github.com/rust-lang/rust/issues/91134>

View file

@ -4,8 +4,8 @@
//@ failure-status: 101
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test "exit (status|code): 101" -> "exit status: 101"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "exit (status|code): 101" -> "exit status: 101"
// doctest fails at runtime
/// ```

View file

@ -4,7 +4,7 @@
//@ failure-status: 101
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ rustc-env:RUST_BACKTRACE=0
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
// doctest fails to compile
/// ```

View file

@ -5,7 +5,7 @@
// adapted to use that, and that normalize line can go away
//@ compile-flags:--test -Z unstable-options --remap-path-prefix={{src-base}}=remapped_path --test-args --test-threads=1
//@ normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
// doctest passes at runtime
/// ```

View file

@ -3,7 +3,7 @@
// Normalize the emitted location so this doesn't need
// updating everytime someone adds or removes a line.
//@ normalize-stderr-test ".rs:\d+:\d+" -> ".rs:LL:CC"
//@ normalize-stderr-test: ".rs:\d+:\d+" -> ".rs:LL:CC"
struct A;
struct B;