[ty] Shorten snapshot names (#18039)

Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
InSync 2025-05-13 23:43:19 +07:00 committed by GitHub
parent f8890b70c3
commit a9f7521944
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
98 changed files with 108 additions and 30 deletions

View file

@ -56,7 +56,10 @@ pub fn run(
let filter = std::env::var(MDTEST_TEST_FILTER).ok();
let mut any_failures = false;
for test in suite.tests() {
if filter.as_ref().is_some_and(|f| !test.name().contains(f)) {
if filter
.as_ref()
.is_some_and(|f| !test.uncontracted_name().contains(f))
{
continue;
}
@ -420,7 +423,7 @@ fn create_diagnostic_snapshot(
let mut snapshot = String::new();
writeln!(snapshot).unwrap();
writeln!(snapshot, "---").unwrap();
writeln!(snapshot, "mdtest name: {}", test.name()).unwrap();
writeln!(snapshot, "mdtest name: {}", test.uncontracted_name()).unwrap();
writeln!(snapshot, "mdtest path: {relative_fixture_path}").unwrap();
writeln!(snapshot, "---").unwrap();
writeln!(snapshot).unwrap();