Skip to content

Commit ffd3e1c

Browse files
committed
test(rm): Assert different error messages for Windows
1 parent 7f35680 commit ffd3e1c

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/by-util/test_rm.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1241,9 +1241,11 @@ fn test_error_message_priority2() {
12411241

12421242
at.touch("f");
12431243

1244-
ts.ucmd()
1245-
.arg("-d")
1246-
.arg(".")
1247-
.fails()
1248-
.stderr_is("rm: cannot remove '.': Directory not empty\n");
1244+
let result = ts.ucmd().arg("-d").arg(".").fails();
1245+
1246+
#[cfg(not(windows))]
1247+
result.stderr_is("rm: cannot remove '.': Directory not empty\n");
1248+
1249+
#[cfg(windows)]
1250+
result.stderr_is("rm: cannot remove '.': The directory is not empty.\r\n");
12491251
}

0 commit comments

Comments
 (0)