Skip to content

Commit

Permalink
Fix macos test
Browse files Browse the repository at this point in the history
ref #51
  • Loading branch information
zhiburt committed Mar 29, 2023
1 parent 7c6f529 commit 00fc0d2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions tests/check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ fn check_eof() {

let m = session.check(Eof).unwrap();
assert_eq!(m.before(), b"");
#[cfg(target_os = "linux")]
assert_eq!(m.get(0).unwrap(), b"'Hello World'\r\n");

#[cfg(not(target_os = "linux"))]
{
if m.matches().len() > 0 {
assert_eq!(m.get(0).unwrap(), b"'Hello World'\r\n");
}

if m.matches().len() > 0 {
#[cfg(target_os = "macos")]
assert_eq!(m.get(0).unwrap(), b"");
#[cfg(not(target_os = "macos"))]
assert_eq!(m.get(0).unwrap(), b"'Hello World'\r\n");
}
}

Expand Down

0 comments on commit 00fc0d2

Please sign in to comment.