Skip to content

Commit 5fa9751

Browse files
committed
Move some rustdoc-ui tests to subdirectories
1 parent 572c0d5 commit 5fa9751

File tree

145 files changed

+40
-29
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

145 files changed

+40
-29
lines changed

tests/rustdoc-ui/cfg-test.rs renamed to tests/rustdoc-ui/doctest/cfg-test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22
// compile-flags:--test --test-args --test-threads=1
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
// Crates like core have doctests gated on `cfg(not(test))` so we need to make

tests/rustdoc-ui/check-cfg-test.rs renamed to tests/rustdoc-ui/doctest/check-cfg-test.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check-pass
22
// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
3-
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
4-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
4+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
55
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
66

77
/// The doctest will produce a warning because feature invalid is unexpected
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
warning: unexpected `cfg` condition value
2+
--> $DIR/check-cfg-test.rs:9:7
3+
|
4+
LL | #[cfg(feature = "invalid")]
5+
| ^^^^^^^^^^^^^^^^^^^
6+
|
7+
= note: expected values for `feature` are: test
8+
= note: `#[warn(unexpected_cfgs)]` on by default
9+
10+
warning: 1 warning emitted
11+

tests/rustdoc-ui/display-output.rs renamed to tests/rustdoc-ui/doctest/display-output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
// check-pass
44
// edition:2018
55
// compile-flags:--test --test-args=--show-output
6-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
6+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
77
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
88

99
/// ```

tests/rustdoc-ui/doc-comment-multi-line-attr.rs renamed to tests/rustdoc-ui/doctest/doc-comment-multi-line-attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest
22
// compile-flags:--test
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55
// check-pass
66

tests/rustdoc-ui/doc-comment-multi-line-cfg-attr.rs renamed to tests/rustdoc-ui/doctest/doc-comment-multi-line-cfg-attr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags:--test
2-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
2+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
33
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
44
// check-pass
55

tests/rustdoc-ui/doc-test-doctest-feature.rs renamed to tests/rustdoc-ui/doctest/doc-test-doctest-feature.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22
// compile-flags:--test
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
// Make sure `cfg(doctest)` is set when finding doctests but not inside

tests/rustdoc-ui/doc-test-rustdoc-feature.rs renamed to tests/rustdoc-ui/doctest/doc-test-rustdoc-feature.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22
// compile-flags:--test
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
#![feature(doc_cfg)]

tests/rustdoc-ui/doctest-multiline-crate-attribute.rs renamed to tests/rustdoc-ui/doctest/doctest-multiline-crate-attribute.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags:--test --test-args=--test-threads=1
2-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
2+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
33
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
44
// check-pass
55

tests/rustdoc-ui/doctest-output.rs renamed to tests/rustdoc-ui/doctest/doctest-output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// edition:2018
22
// aux-build:extern_macros.rs
33
// compile-flags:--test --test-args=--test-threads=1
4-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
4+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
55
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
66
// check-pass
77

tests/rustdoc-ui/failed-doctest-compile-fail.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-compile-fail.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// adapted to use that, and that normalize line can go away
33

44
// compile-flags:--test
5-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
5+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
66
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
77
// failure-status: 101
88

tests/rustdoc-ui/failed-doctest-extra-semicolon-on-item.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-extra-semicolon-on-item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// adapted to use that, and that normalize line can go away
33

44
// compile-flags:--test
5-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
5+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
66
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
77
// failure-status: 101
88

tests/rustdoc-ui/failed-doctest-missing-codes.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-missing-codes.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// adapted to use that, and that normalize line can go away
33

44
// compile-flags:--test
5-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
5+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
66
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
77
// failure-status: 101
88

tests/rustdoc-ui/failed-doctest-output-windows.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-output-windows.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// compile-flags:--test --test-args --test-threads=1
99
// rustc-env:RUST_BACKTRACE=0
10-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
10+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
1111
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
1212
// failure-status: 101
1313

tests/rustdoc-ui/failed-doctest-output.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-output.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
// compile-flags:--test --test-args --test-threads=1
99
// rustc-env:RUST_BACKTRACE=0
10-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
10+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
1111
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
1212
// failure-status: 101
1313

tests/rustdoc-ui/failed-doctest-should-panic.rs renamed to tests/rustdoc-ui/doctest/failed-doctest-should-panic.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// adapted to use that, and that normalize line can go away
33

44
// compile-flags:--test
5-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
5+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
66
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
77
// failure-status: 101
88

tests/rustdoc-ui/no-run-flag.rs renamed to tests/rustdoc-ui/doctest/no-run-flag.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
// check-pass
44
// compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
5-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
5+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
66
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
77

88
/// ```

tests/rustdoc-ui/nocapture-fail.rs renamed to tests/rustdoc-ui/doctest/nocapture-fail.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// check-pass
22
// compile-flags:--test -Zunstable-options --nocapture
3-
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
4-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
4+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
55
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
66

77
/// ```compile_fail

tests/rustdoc-ui/nocapture.rs renamed to tests/rustdoc-ui/doctest/nocapture.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22
// compile-flags:--test -Zunstable-options --nocapture
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
/// ```

tests/rustdoc-ui/run-directory.rs renamed to tests/rustdoc-ui/doctest/run-directory.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@
44
// check-pass
55
// [correct]compile-flags:--test --test-run-directory={{src-base}}
66
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
7-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
7+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
88
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
99

1010
/// ```
1111
/// assert_eq!(
12-
/// std::fs::read_to_string("run-directory.rs").unwrap(),
12+
/// std::fs::read_to_string("doctest/run-directory.rs").unwrap(),
1313
/// include_str!("run-directory.rs"),
1414
/// );
1515
/// ```
1616
#[cfg(correct)]
1717
pub fn foo() {}
1818

1919
/// ```
20-
/// assert!(std::fs::read_to_string("run-directory.rs").is_err());
20+
/// assert!(std::fs::read_to_string("doctest/run-directory.rs").is_err());
2121
/// ```
2222
#[cfg(incorrect)]
2323
pub fn foo() {}

tests/rustdoc-ui/test-no_std.rs renamed to tests/rustdoc-ui/doctest/test-no_std.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags:--test
2-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
2+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
33
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
44
// check-pass
55

tests/rustdoc-ui/test-type.rs renamed to tests/rustdoc-ui/doctest/test-type.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// compile-flags: --test --test-args=--test-threads=1
22
// check-pass
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
/// ```

tests/rustdoc-ui/unparseable-doc-test.rs renamed to tests/rustdoc-ui/doctest/unparseable-doc-test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags: --test
2-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
2+
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
33
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
44
// failure-status: 101
55
// rustc-env: RUST_BACKTRACE=0

tests/rustdoc-ui/issue-80992.rs renamed to tests/rustdoc-ui/issues/issue-80992.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// check-pass
22
// compile-flags:--test
3-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
3+
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
44
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
55

66
pub fn test() -> Result<(), ()> {

tests/rustdoc-ui/issue-81662-shortness.rs renamed to tests/rustdoc-ui/issues/issue-81662-shortness.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// compile-flags:--test --error-format=short
2-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
2+
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
33
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
44
// failure-status: 101
55

tests/rustdoc-ui/issue-91134.rs renamed to tests/rustdoc-ui/issues/issue-91134.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
22
// aux-build:empty-fn.rs
33
// check-pass
4-
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
4+
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
55
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
66
// edition:2021
77

0 commit comments

Comments
 (0)