mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Move some rustdoc-ui tests to subdirectories
This commit is contained in:
parent
572c0d553f
commit
5fa975142f
@ -1,6 +1,6 @@
|
||||
// check-pass
|
||||
// compile-flags:--test --test-args --test-threads=1
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// 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
|
@ -1,7 +1,7 @@
|
||||
// check-pass
|
||||
// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
|
||||
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// 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"
|
||||
|
||||
/// The doctest will produce a warning because feature invalid is unexpected
|
11
tests/rustdoc-ui/doctest/check-cfg-test.stderr
Normal file
11
tests/rustdoc-ui/doctest/check-cfg-test.stderr
Normal file
@ -0,0 +1,11 @@
|
||||
warning: unexpected `cfg` condition value
|
||||
--> $DIR/check-cfg-test.rs:9:7
|
||||
|
|
||||
LL | #[cfg(feature = "invalid")]
|
||||
| ^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: expected values for `feature` are: test
|
||||
= note: `#[warn(unexpected_cfgs)]` on by default
|
||||
|
||||
warning: 1 warning emitted
|
||||
|
@ -3,7 +3,7 @@
|
||||
// check-pass
|
||||
// edition:2018
|
||||
// compile-flags:--test --test-args=--show-output
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
@ -1,6 +1,6 @@
|
||||
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// check-pass
|
||||
|
@ -1,5 +1,5 @@
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// check-pass
|
||||
|
@ -1,6 +1,6 @@
|
||||
// check-pass
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
// Make sure `cfg(doctest)` is set when finding doctests but not inside
|
@ -1,6 +1,6 @@
|
||||
// check-pass
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
#![feature(doc_cfg)]
|
@ -1,5 +1,5 @@
|
||||
// compile-flags:--test --test-args=--test-threads=1
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// check-pass
|
||||
|
@ -1,7 +1,7 @@
|
||||
// edition:2018
|
||||
// aux-build:extern_macros.rs
|
||||
// compile-flags:--test --test-args=--test-threads=1
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// check-pass
|
||||
|
@ -2,7 +2,7 @@
|
||||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -2,7 +2,7 @@
|
||||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -2,7 +2,7 @@
|
||||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// compile-flags:--test --test-args --test-threads=1
|
||||
// rustc-env:RUST_BACKTRACE=0
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
// compile-flags:--test --test-args --test-threads=1
|
||||
// rustc-env:RUST_BACKTRACE=0
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -2,7 +2,7 @@
|
||||
// adapted to use that, and that normalize line can go away
|
||||
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
// check-pass
|
||||
// compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
@ -1,7 +1,7 @@
|
||||
// check-pass
|
||||
// compile-flags:--test -Zunstable-options --nocapture
|
||||
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// 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"
|
||||
|
||||
/// ```compile_fail
|
@ -1,6 +1,6 @@
|
||||
// check-pass
|
||||
// compile-flags:--test -Zunstable-options --nocapture
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
@ -4,12 +4,12 @@
|
||||
// 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" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
||||
/// assert_eq!(
|
||||
/// std::fs::read_to_string("run-directory.rs").unwrap(),
|
||||
/// std::fs::read_to_string("doctest/run-directory.rs").unwrap(),
|
||||
/// include_str!("run-directory.rs"),
|
||||
/// );
|
||||
/// ```
|
||||
@ -17,7 +17,7 @@
|
||||
pub fn foo() {}
|
||||
|
||||
/// ```
|
||||
/// assert!(std::fs::read_to_string("run-directory.rs").is_err());
|
||||
/// assert!(std::fs::read_to_string("doctest/run-directory.rs").is_err());
|
||||
/// ```
|
||||
#[cfg(incorrect)]
|
||||
pub fn foo() {}
|
@ -1,5 +1,5 @@
|
||||
// compile-flags:--test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// check-pass
|
||||
|
@ -1,6 +1,6 @@
|
||||
// compile-flags: --test --test-args=--test-threads=1
|
||||
// check-pass
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
|
||||
/// ```
|
@ -1,5 +1,5 @@
|
||||
// compile-flags: --test
|
||||
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
|
||||
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
|
||||
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
|
||||
// failure-status: 101
|
||||
// rustc-env: RUST_BACKTRACE=0
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user