Skip to content

Commit ee8ffed

Browse files
committed
fixup tests
Signed-off-by: tison <[email protected]>
1 parent f527072 commit ee8ffed

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

test/test_syslog.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
use nix::syslog::Priority;
2+
13
#[cfg(target_os = "macos")]
24
#[test]
35
fn test_syslog_hello_world() {
46
use nix::syslog::{openlog, syslog, Facility, LogFlags, Severity};
57

6-
openlog(
7-
"test_syslog_hello_world",
8-
LogFlags::LOG_PID,
9-
Facility::LOG_USER,
10-
);
11-
syslog(Severity::LOG_ERR as libc::c_int, "Hello, nix!");
8+
let name = "test_syslog_hello_world";
9+
openlog(name, LogFlags::LOG_PID, Facility::LOG_USER).unwrap();
10+
syslog(Priority::from_severity(Severity::LOG_EMERG), "Hello, nix!");
1211
}

0 commit comments

Comments
 (0)