()
| 180 | |
| 181 | #[tokio::test] |
| 182 | async fn test_paging_short_columns() { |
| 183 | let mut cb = MockConsole::default(); |
| 184 | cb.set_size_chars(CharsXY { x: 10, y: 3 }); |
| 185 | cb.set_interactive(true); |
| 186 | cb.add_input_keys(&[Key::NewLine, Key::Char('a')]); |
| 187 | |
| 188 | let mut pager = Pager::new(&mut cb, None).unwrap(); |
| 189 | pager.print("line 1").await.unwrap(); |
| 190 | pager.print("line 2").await.unwrap(); |
| 191 | pager.print("line 3").await.unwrap(); |
| 192 | pager.print("line 4").await.unwrap(); |
| 193 | pager.print("line 5").await.unwrap(); |
| 194 | |
| 195 | assert_eq!( |
| 196 | [ |
| 197 | CapturedOut::Print("line 1".to_owned()), |
| 198 | CapturedOut::Print("line 2".to_owned()), |
| 199 | CapturedOut::Print(MORE_MESSAGE_NARROW.to_owned()), |
| 200 | CapturedOut::Print("line 3".to_owned()), |
| 201 | CapturedOut::Print("line 4".to_owned()), |
| 202 | CapturedOut::Print(MORE_MESSAGE_NARROW.to_owned()), |
| 203 | CapturedOut::Print("line 5".to_owned()), |
| 204 | ], |
| 205 | cb.captured_out() |
| 206 | ); |
| 207 | } |
| 208 | |
| 209 | #[tokio::test] |
| 210 | async fn test_paging_long_columns() { |
nothing calls this directly
no test coverage detected