From 74ee8fb1c1b5835ed18c2aaf8e38b8d478814d6e Mon Sep 17 00:00:00 2001 From: Daniel Hofstetter Date: Wed, 10 Sep 2025 09:44:52 +0200 Subject: [PATCH] touch: adapt expected error message in test --- tests/by-util/test_touch.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/by-util/test_touch.rs b/tests/by-util/test_touch.rs index f5c66bc24..288a0b8b1 100644 --- a/tests/by-util/test_touch.rs +++ b/tests/by-util/test_touch.rs @@ -765,9 +765,9 @@ fn test_touch_trailing_slash() { fn test_touch_trailing_slash_windows() { let (_at, mut ucmd) = at_and_ucmd!(); let file = "no-file/"; - ucmd.args(&[file]).fails().stderr_only(format!( - "touch: cannot touch '{file}': The filename, directory name, or volume label syntax is incorrect.\n" - )); + ucmd.args(&[file]) + .fails() + .stderr_contains(format!("touch: cannot touch '{file}'")); } #[test]