diff options
| author | bors <bors@rust-lang.org> | 2024-03-05 13:02:42 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-05 13:02:42 +0000 |
| commit | c7beecf3e3cef7a8226a99aec4e4f6bfc114ba8e (patch) | |
| tree | 0c735045917e5f6f2432d5c81337e1431a65fad2 /tests | |
| parent | bdde2a80aef587cdbb8eb2d6e295d5c1d05830d9 (diff) | |
| parent | 247a080b9852e3ab176cca63f5695c8a6b2202cd (diff) | |
Auto merge of #121992 - jieyouxu:fix-tidy-unpaired-revision, r=onur-ozkan
tidy: split dots in filename not the entire path when checking for stray stdout/stderr files I committed a path crime by splitting the entire path on `.`, when I meant to split on the filename. This means that any parent folders which contain `.` will cause tidy failure. Added a regression test so that doesn't happen again. ### Follow-up - [ ] Adjust rustc-dev-guide to document assert on test name not containing dots. https://github.com/rust-lang/rustc-dev-guide/pull/1927 Fixes #121986.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc/invalid$crate$name.rs (renamed from tests/rustdoc/invalid.crate.name.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/command/need-crate-arg-ignore-tidy$x.rs (renamed from tests/ui/command/need-crate-arg-ignore-tidy.x.rs) | 0 | ||||
| -rw-r--r-- | tests/ui/command/need-crate-arg-ignore-tidy$x.stderr (renamed from tests/ui/command/need-crate-arg-ignore-tidy.x.stderr) | 2 | ||||
| -rw-r--r-- | tests/ui/meta/dir.with.dots/test.rs | 7 |
4 files changed, 8 insertions, 1 deletions
diff --git a/tests/rustdoc/invalid.crate.name.rs b/tests/rustdoc/invalid$crate$name.rs index 189a6c92124..189a6c92124 100644 --- a/tests/rustdoc/invalid.crate.name.rs +++ b/tests/rustdoc/invalid$crate$name.rs diff --git a/tests/ui/command/need-crate-arg-ignore-tidy.x.rs b/tests/ui/command/need-crate-arg-ignore-tidy$x.rs index b1ac4a4ae21..b1ac4a4ae21 100644 --- a/tests/ui/command/need-crate-arg-ignore-tidy.x.rs +++ b/tests/ui/command/need-crate-arg-ignore-tidy$x.rs diff --git a/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr b/tests/ui/command/need-crate-arg-ignore-tidy$x.stderr index 89f7210c048..28f6d31b1ce 100644 --- a/tests/ui/command/need-crate-arg-ignore-tidy.x.stderr +++ b/tests/ui/command/need-crate-arg-ignore-tidy$x.stderr @@ -1,4 +1,4 @@ -error: invalid character `'.'` in crate name: `need_crate_arg_ignore_tidy.x` +error: invalid character `'$'` in crate name: `need_crate_arg_ignore_tidy$x` | = help: you can either pass `--crate-name` on the command line or add `#![crate_name="…"]` to set the crate name diff --git a/tests/ui/meta/dir.with.dots/test.rs b/tests/ui/meta/dir.with.dots/test.rs new file mode 100644 index 00000000000..4d663e994f5 --- /dev/null +++ b/tests/ui/meta/dir.with.dots/test.rs @@ -0,0 +1,7 @@ +// Regression test for <https://github.com/rust-lang/rust/issues/121986>. +// Check that `tests_revision_unpaired_stdout_stderr` don't accidentally get confused by +// paths containing periods. + +//@ check-pass + +fn main() {} |
