()
| 162 | |
| 163 | #[tokio::test] |
| 164 | async fn test_yields_after_interactive_prints() { |
| 165 | let mut cb = MockConsole::default(); |
| 166 | cb.set_size_chars(CharsXY { x: 10, y: 5 }); |
| 167 | cb.set_interactive(true); |
| 168 | let count = Rc::from(RefCell::from(0)); |
| 169 | |
| 170 | let mut pager = Pager::new( |
| 171 | &mut cb, |
| 172 | Some(Rc::from(RefCell::from(CountingYielder { count: count.clone() }))), |
| 173 | ) |
| 174 | .unwrap(); |
| 175 | pager.print("line 1").await.unwrap(); |
| 176 | pager.print("line 2").await.unwrap(); |
| 177 | |
| 178 | assert_eq!(2, *count.borrow()); |
| 179 | } |
| 180 | |
| 181 | #[tokio::test] |
| 182 | async fn test_paging_short_columns() { |
nothing calls this directly
no test coverage detected