Skip to content

Commit

Permalink
Assert that test names cannot contain dots
Browse files Browse the repository at this point in the history
This is so that we can catch stray test output files, since test names
without dots can form predictable patterns we can match on.
  • Loading branch information
jieyouxu committed Mar 5, 2024
1 parent 9bebbf1 commit 53f48dd
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/tools/tidy/src/tests_revision_unpaired_stdout_stderr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

Expand Down

0 comments on commit 53f48dd

Please sign in to comment.