Skip to content

Commit

Permalink
chore: fix core test
Browse files Browse the repository at this point in the history
  • Loading branch information
oneofthezombies committed Feb 12, 2024
1 parent b2ebb2e commit 5f35116
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions crates/libs/kill_tree/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ mod tests {
#[cfg(unix)]
#[test]
fn error_display_unix() {
let error = Error::Unix(nix::Error::UnsupportedOperation);
assert_eq!(format!("{error}"), "Unix error: UnsupportedOperation");
let error = Error::Unix(nix::Error::EPERM);
assert_eq!(
format!("{error}"),
"Unix error: EPERM: Operation not permitted"
);
}

#[test]
Expand All @@ -240,9 +243,12 @@ mod tests {
#[cfg(unix)]
#[test]
fn from_unix_error() {
let error = nix::Error::UnsupportedOperation;
let error = nix::Error::EPERM;
let error = Error::from(error);
assert_eq!(format!("{error}"), "Unix error: UnsupportedOperation");
assert_eq!(
format!("{error}"),
"Unix error: EPERM: Operation not permitted"
);
}

#[test]
Expand Down

0 comments on commit 5f35116

Please sign in to comment.