Skip to content

Commit 5f35116

Browse files
committed
chore: fix core test
1 parent b2ebb2e commit 5f35116

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

crates/libs/kill_tree/src/core.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,11 @@ mod tests {
215215
#[cfg(unix)]
216216
#[test]
217217
fn error_display_unix() {
218-
let error = Error::Unix(nix::Error::UnsupportedOperation);
219-
assert_eq!(format!("{error}"), "Unix error: UnsupportedOperation");
218+
let error = Error::Unix(nix::Error::EPERM);
219+
assert_eq!(
220+
format!("{error}"),
221+
"Unix error: EPERM: Operation not permitted"
222+
);
220223
}
221224

222225
#[test]
@@ -240,9 +243,12 @@ mod tests {
240243
#[cfg(unix)]
241244
#[test]
242245
fn from_unix_error() {
243-
let error = nix::Error::UnsupportedOperation;
246+
let error = nix::Error::EPERM;
244247
let error = Error::from(error);
245-
assert_eq!(format!("{error}"), "Unix error: UnsupportedOperation");
248+
assert_eq!(
249+
format!("{error}"),
250+
"Unix error: EPERM: Operation not permitted"
251+
);
246252
}
247253

248254
#[test]

0 commit comments

Comments
 (0)