Vendor dependencies
Let's see how I like this workflow.
This commit is contained in:
parent
34d1830413
commit
9c435dc440
7500 changed files with 1665121 additions and 99 deletions
25
vendor/signal-hook/tests/default.rs
vendored
Normal file
25
vendor/signal-hook/tests/default.rs
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
//! Check the hack of SIG_DFL for windows.
|
||||
//!
|
||||
//! Libc doesn't export SIG_DFL on windows. It seems to be 0 on all platforms, though, but just to
|
||||
//! make sure, we observe it is so. We try to read the previous signal on startup and it must be
|
||||
//! the default.
|
||||
|
||||
extern crate libc;
|
||||
|
||||
use libc::{sighandler_t, signal, SIGTERM};
|
||||
|
||||
const SIG_DFL: sighandler_t = 0;
|
||||
|
||||
#[test]
|
||||
fn sig_dfl() {
|
||||
unsafe {
|
||||
let prev = signal(SIGTERM, SIG_DFL);
|
||||
assert_eq!(SIG_DFL, prev);
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(windows))]
|
||||
#[test]
|
||||
fn sig_dfl_static() {
|
||||
assert_eq!(::libc::SIG_DFL, SIG_DFL);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue