From c1d2362f1d41889a01c5b7d6786d73e75d2aa883 Mon Sep 17 00:00:00 2001 From: Jeremy Smart Date: Sun, 11 May 2025 20:18:13 -0400 Subject: [PATCH] fix windows test --- tests/by-util/test_hashsum.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/by-util/test_hashsum.rs b/tests/by-util/test_hashsum.rs index bcd53461d..3cb352810 100644 --- a/tests/by-util/test_hashsum.rs +++ b/tests/by-util/test_hashsum.rs @@ -107,12 +107,17 @@ macro_rules! test_digest { at.write("a", "file1\n"); at.write("c", "file3\n"); + #[cfg(unix)] + let file_not_found_str = "No such file or directory"; + #[cfg(not(unix))] + let file_not_found_str = "The system cannot find the file specified"; + ts.ucmd() .args(&[DIGEST_ARG, BITS_ARG, "a", "b", "c"]) .fails() .stdout_contains("a\n") .stdout_contains("c\n") - .stderr_contains("b: No such file or directory"); + .stderr_contains(format!("b: {file_not_found_str}")); } } )*)