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

Function test_yields_after_interactive_prints

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

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 3

set_interactiveMethod · 0.80
set_size_charsMethod · 0.45
printMethod · 0.45

Tested by

no test coverage detected