diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-05 08:11:27 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-03-05 08:11:27 +0000 |
| commit | 53f48ddbc7f6a42c2e67f8b16f5868f483821744 (patch) | |
| tree | 3276fbb0692410f7b937621a363789dc56fc2a97 | |
| parent | 9bebbf14c57c027138fd4bb335acaf9b83aa68b6 (diff) | |
Assert that test names cannot contain dots
This is so that we can catch stray test output files, since test names without dots can form predictable patterns we can match on.
| -rw-r--r-- | src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs b/src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs index 98b47b6ef66..a0773c85bef 100644 --- a/src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs +++ b/src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs @@ -88,6 +88,12 @@ pub fn check(tests_path: impl AsRef<Path>, bad: &mut bool) { continue; }; + assert!( + !test_name.contains('.'), + "test name cannot contain dots '.': `{}`", + test.display() + ); + test_info.insert(test_name.to_string(), (test, expected_revisions)); } |
