mirror of
https://github.com/tokio-rs/tokio.git
synced 2025-09-25 12:00:35 +00:00

* Don't use tokio-core any more for tests. That one brings tokio from crates.io instead of the current workspace and two versions of that don't want to cooperate. * Guard unix-specific examples on windows. * Leave CI setup to top-level directory.
20 lines
490 B
Rust
20 lines
490 B
Rust
#![cfg(unix)]
|
|
|
|
extern crate libc;
|
|
|
|
pub mod support;
|
|
use support::*;
|
|
|
|
#[test]
|
|
fn twice() {
|
|
let mut rt = CurrentThreadRuntime::new().unwrap();
|
|
let signal = run_with_timeout(&mut rt, Signal::new(libc::SIGUSR1)).unwrap();
|
|
|
|
send_signal(libc::SIGUSR1);
|
|
let (num, signal) = run_with_timeout(&mut rt, signal.into_future()).ok().unwrap();
|
|
assert_eq!(num, Some(libc::SIGUSR1));
|
|
|
|
send_signal(libc::SIGUSR1);
|
|
run_with_timeout(&mut rt, signal.into_future()).ok().unwrap();
|
|
}
|