From 8ae3ca98e5c225da22e7ab1a86069098a74cdfe2 Mon Sep 17 00:00:00 2001 From: Chris Denton Date: Sun, 16 Feb 2025 09:08:24 +0000 Subject: [PATCH] Fix test that relies on error language --- tests/ui/unpretty/staged-api-invalid-path-108697.rs | 4 ++-- tests/ui/unpretty/staged-api-invalid-path-108697.stderr | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/ui/unpretty/staged-api-invalid-path-108697.rs b/tests/ui/unpretty/staged-api-invalid-path-108697.rs index 71bad213576c7..8a806b10d9da1 100644 --- a/tests/ui/unpretty/staged-api-invalid-path-108697.rs +++ b/tests/ui/unpretty/staged-api-invalid-path-108697.rs @@ -2,8 +2,8 @@ // ICE: tcx.resolutions(()) is not supported for local crate -Zunpretty=mir // on invalid module path with staged_api //@ compile-flags: -Zunpretty=mir -//@ normalize-stderr: "The system cannot find the file specified." -> "No such file or directory" +//@ normalize-stderr: "lol`: .*\(" -> "lol`: $$FILE_NOT_FOUND_MSG (" #![feature(staged_api)] #[path = "lol"] mod foo; -//~^ ERROR couldn't read +//~^ ERROR couldn't read `$DIR/lol` diff --git a/tests/ui/unpretty/staged-api-invalid-path-108697.stderr b/tests/ui/unpretty/staged-api-invalid-path-108697.stderr index e68e19c4dc99e..188f4985ded56 100644 --- a/tests/ui/unpretty/staged-api-invalid-path-108697.stderr +++ b/tests/ui/unpretty/staged-api-invalid-path-108697.stderr @@ -1,4 +1,4 @@ -error: couldn't read `$DIR/lol`: No such file or directory (os error 2) +error: couldn't read `$DIR/lol`: $FILE_NOT_FOUND_MSG (os error 2) --> $DIR/staged-api-invalid-path-108697.rs:8:1 | LL | mod foo;