Remove the -test
suffix from normalize directives
This commit is contained in:
parent
5ba0dd4ef6
commit
835fbcbcab
238 changed files with 442 additions and 443 deletions
|
@ -1,9 +1,9 @@
|
|||
//@ check-pass
|
||||
//@ edition: 2024
|
||||
//@ compile-flags: --test --test-args=--test-threads=1
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
/// ```
|
||||
/// let x = 12;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
//@ check-pass
|
||||
//@ edition: 2024
|
||||
//@ compile-flags: --test --test-args=--test-threads=1
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
/// This doctest is used to ensure that if a crate attribute is present,
|
||||
/// it will not be part of the merged doctests.
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
// line arguments and is only run on windows.
|
||||
//
|
||||
//@ only-windows
|
||||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args
|
||||
|
||||
#[cfg(not(cmdline_set))]
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
// windows.
|
||||
//
|
||||
//@ ignore-windows
|
||||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args
|
||||
|
||||
#[cfg(not(cmdline_set))]
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
// line arguments and is only run on windows.
|
||||
//
|
||||
//@ only-windows
|
||||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
|
||||
//@ compile-flags: --cfg cmdline_set @{{src-base}}\argfile\commandline-argfile-missing.args @{{src-base}}\argfile\commandline-argfile-badutf8.args @{{src-base}}\argfile\commandline-argfile-missing2.args
|
||||
|
||||
#[cfg(not(cmdline_set))]
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
// windows.
|
||||
//
|
||||
//@ ignore-windows
|
||||
//@ normalize-stderr-test: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr-test: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "os error \d+" -> "os error $$ERR"
|
||||
//@ normalize-stderr: "commandline-argfile-missing.args:[^(]*" -> "commandline-argfile-missing.args: $$FILE_MISSING "
|
||||
//@ normalize-stderr: "commandline-argfile-missing2.args:[^(]*" -> "commandline-argfile-missing2.args: $$FILE_MISSING "
|
||||
//@ compile-flags: --cfg cmdline_set @{{src-base}}/argfile/commandline-argfile-missing.args @{{src-base}}/argfile/commandline-argfile-badutf8.args @{{src-base}}/argfile/commandline-argfile-missing2.args
|
||||
|
||||
#[cfg(not(cmdline_set))]
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@ check-pass
|
||||
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
|
||||
//! [struct@m!()] //~ WARN: unmatched disambiguator `struct` and suffix `!()`
|
||||
//! [struct@m!{}]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//@ check-pass
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// This test ensures that no code block is detected in the doc comments.
|
||||
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "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`.
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ check-pass
|
||||
//@ 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-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// The doctest will produce a warning because feature invalid is unexpected
|
||||
/// ```
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ compile-flags:--test --test-args --test-threads=1
|
||||
//@ failure-status: 101
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
//! ```
|
||||
#![doc = "#![all\
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
|
||||
//@ compile-flags:--test --test-args --test-threads=1
|
||||
//@ failure-status: 101
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
/*!
|
||||
```rust
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
//@ edition: 2024
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
// This test ensures that the doctest will not use `#[allow(unused)]`.
|
||||
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
#![doc(test(attr(allow(unused_variables), deny(warnings))))]
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
//@ check-pass
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// #![warn(unused)]
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
//! ```rust
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
/// ```
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// Make sure `cfg(doctest)` is set when finding doctests but not inside
|
||||
// the doctests.
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
#![feature(doc_cfg)]
|
||||
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
/// ```
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//@ edition:2024
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/130470
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
//@[edition2024]edition:2015
|
||||
//@[edition2024]aux-build:extern_macros.rs
|
||||
//@[edition2024]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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
//! ```
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```compile_fail
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// <https://github.com/rust-lang/rust/issues/91014>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```compile_fail,E0004
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
// doctest fails at runtime
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
// doctest fails at runtime
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
//@ compile-flags:--test --edition 2021
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```should_panic
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
//@ edition: 2024
|
||||
//@ compile-flags:--test
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```should_panic
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//@ edition: 2024
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
/// ```ignore (test)
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// Regression test for <https://github.com/rust-lang/rust/issues/131893>.
|
||||
// It ensures that if a function called `main` is nested, it will not consider
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// let a = true;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ check-pass
|
||||
//@ 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-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```compile_fail
|
||||
/// fn foo() {
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// println!("hello!");
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
//@ failure-status: 101
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
#![doc(test(attr(deny(non_local_definitions))))]
|
||||
#![doc(test(attr(allow(dead_code))))]
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ check-pass
|
||||
//@ 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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stderr: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
//! ```
|
||||
//! #[macro_export]
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
//@[edition2024]edition:2024
|
||||
//@[edition2024]check-pass
|
||||
//@[edition2024]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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// https://github.com/rust-lang/rust/issues/132203
|
||||
// This version, because it's edition2024, passes thanks to the new
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
//@ check-pass
|
||||
//@ [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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// assert_eq!(
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
//@ check-pass
|
||||
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
|
||||
//@ compile-flags: --doctest-compilation-args=--cfg=another
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// #[cfg(testcase_must_be_present)]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
//@ check-pass
|
||||
//@ compile-flags: --test -Zunstable-options --doctest-compilation-args=--cfg=testcase_must_be_present
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// #[cfg(testcase_must_be_present)]
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
//@ edition: 2024
|
||||
//@ 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: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
|
||||
#![deny(warnings)]
|
||||
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ check-pass
|
||||
|
||||
#![no_std]
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// let a = true;
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
//@ rustc-env: RUST_BACKTRACE=0
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ edition: 2024
|
||||
//@ 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: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@ normalize-stderr-test: "`.*`" -> "`DEF_ID`"
|
||||
//@ normalize-stdout-test: "`.*`" -> "`DEF_ID`"
|
||||
//@ normalize-stderr: "`.*`" -> "`DEF_ID`"
|
||||
//@ normalize-stdout: "`.*`" -> "`DEF_ID`"
|
||||
//@ edition:2018
|
||||
|
||||
pub async fn f() -> impl std::fmt::Debug {
|
||||
|
|
|
@ -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: "note: compiler flags.*\n\n" -> ""
|
||||
//@ normalize-stderr: "note: rustc.*running on.*" -> "note: rustc {version} running on {platform}"
|
||||
//@ normalize-stderr: "thread.*panicked at compiler.*" -> ""
|
||||
//@ normalize-stderr: " +\d{1,}: .*\n" -> ""
|
||||
//@ normalize-stderr: " + at .*\n" -> ""
|
||||
//@ normalize-stderr: ".*note: Some details are omitted.*\n" -> ""
|
||||
|
||||
fn wrong()
|
||||
//~^ ERROR expected one of
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ check-pass
|
||||
#![deny(warnings)]
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
#![deny(warnings)]
|
||||
|
||||
//! Linking to [foo@banana] and [`bar@banana!()`].
|
||||
|
|
|
@ -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: "tests/rustdoc-ui/issues" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
pub fn test() -> Result<(), ()> {
|
||||
//! ```compile_fail
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ compile-flags:--test --error-format=short
|
||||
//@ check-stdout
|
||||
//@ error-pattern:cannot find function `foo`
|
||||
//@ normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
|
||||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "tests/rustdoc-ui/issues" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ failure-status: 101
|
||||
|
||||
/// ```rust
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
//
|
||||
// ignore-tidy-linelength
|
||||
//
|
||||
//@ normalize-stdout-test: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS"
|
||||
//@ normalize-stdout-test: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS"
|
||||
//@ normalize-stdout: "( +name default meaning\n +---- ------- -------\n)?( *[[:word:]:-]+ (allow |warn |deny |forbid ) [^\n]+\n)+" -> " $$NAMES $$LEVELS $$MEANINGS"
|
||||
//@ normalize-stdout: " +name sub-lints\n +---- ---------\n( *[[:word:]:-]+ [^\n]+\n)+" -> " $$NAMES $$SUB_LINTS"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
//@ compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
|
||||
//@ 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: "tests/rustdoc-ui/issues" -> "$$DIR"
|
||||
//@ normalize-stdout: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ edition:2021
|
||||
|
||||
/// <https://github.com/rust-lang/rust/issues/91134>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//@ check-pass
|
||||
//@ compile-flags: -Z unstable-options --check
|
||||
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
|
||||
#![feature(rustdoc_missing_doc_code_examples)]
|
||||
//~^ WARN
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
//@ error-pattern: no documentation found
|
||||
//@ normalize-stderr-test: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
//@ normalize-stderr: "nightly|beta|1\.[0-9][0-9]\.[0-9]" -> "$$CHANNEL"
|
||||
#![deny(rustdoc::missing_crate_level_docs)]
|
||||
//^~ NOTE defined here
|
||||
|
||||
|
|
|
@ -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: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
//@ normalize-stdout: "exit (status|code): 101" -> "exit status: 101"
|
||||
|
||||
// doctest fails at runtime
|
||||
/// ```
|
||||
|
|
|
@ -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: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// doctest fails to compile
|
||||
/// ```
|
||||
|
|
|
@ -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: "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// doctest passes at runtime
|
||||
/// ```
|
||||
|
|
|
@ -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: ".rs:\d+:\d+" -> ".rs:LL:CC"
|
||||
|
||||
struct A;
|
||||
struct B;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue