1#![warn(rust_2018_idioms)]
2#![cfg(feature = "full")]
3#![cfg(unix)]
4
5mod support {
6 pub mod signal;
7}
8use support::signal::send_signal;
9
10use tokio::signal::unix::{signal, SignalKind};
11use tokio_test::assert_ok;
12
13#[tokio::test]
14async fn signal_usr1() {
15 let mut signal = assert_ok!(
16 signal(SignalKind::user_defined1()),
17 "failed to create signal"
18 );
19
20 send_signal(libc::SIGUSR1);
21
22 signal.recv().await;
23}
24