()
| 246 | |
| 247 | #[test] |
| 248 | fn test_drain_signals_ignores_pending_break() { |
| 249 | let (tx, rx) = async_channel::unbounded(); |
| 250 | let mut machine = MachineBuilder::default().with_signals_chan((tx.clone(), rx)).build(); |
| 251 | |
| 252 | block_on(tx.send(Signal::Break)).unwrap(); |
| 253 | machine.drain_signals(); |
| 254 | |
| 255 | machine.compile(&mut "a = 1".as_bytes()).unwrap(); |
| 256 | match block_on(machine.exec()) { |
| 257 | Ok(None) => (), |
| 258 | r => panic!("Expected Ok(None) but got {:?}", r), |
| 259 | } |
| 260 | assert_eq!(0, tx.len()); |
| 261 | } |
| 262 | |
| 263 | fn do_no_check_stop_test(code: &str) { |
| 264 | let (tx, rx) = async_channel::unbounded(); |
nothing calls this directly
no test coverage detected