blob: 4b057ee7e1405f1cbd7a3ea5f5d77a476cff76d9 [file] [log] [blame]
#![cfg(feature = "full")]
mod support {
pub mod signal;
use support::signal::send_signal;
use tokio::signal;
use tokio::sync::oneshot;
use tokio_test::assert_ok;
async fn ctrl_c() {
let ctrl_c = signal::ctrl_c();
let (fire, wait) = oneshot::channel();
// NB: simulate a signal coming in by exercising our signal handler
// to avoid complications with sending SIGINT to the test process
tokio::spawn(async {
wait.await.expect("wait failed");
let _ = fire.send(());