MCPcopy Index your code
hub / github.com/endbasic/endbasic / test_paging_long_columns

Function test_paging_long_columns

std/src/console/pager.rs:210–228  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208
209 #[tokio::test]
210 async fn test_paging_long_columns() {
211 let mut cb = MockConsole::default();
212 cb.set_size_chars(CharsXY { x: 10, y: 3 });
213 cb.set_interactive(true);
214 cb.add_input_keys(&[Key::NewLine]);
215
216 let mut pager = Pager::new(&mut cb, None).unwrap();
217 pager.print("this line is long").await.unwrap();
218 pager.print("line 2").await.unwrap();
219
220 assert_eq!(
221 [
222 CapturedOut::Print("this line is long".to_owned()),
223 CapturedOut::Print(MORE_MESSAGE_NARROW.to_owned()),
224 CapturedOut::Print("line 2".to_owned()),
225 ],
226 cb.captured_out()
227 );
228 }
229
230 #[tokio::test]
231 async fn test_paging_wide_message() {

Callers

nothing calls this directly

Calls 4

set_interactiveMethod · 0.80
add_input_keysMethod · 0.80
set_size_charsMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected