MCPcopy Create free account
hub / github.com/ankddev/envfetch / test_draw_scrolling

Function test_draw_scrolling

src/interactive/view.rs:254–268  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252
253 #[test]
254 fn test_draw_scrolling() -> io::Result<()> {
255 let backend = TestBackend::new(80, 30);
256 let mut state = AppState::new(
257 (0..20)
258 .map(|i| (format!("VAR{}", i), format!("VALUE{}", i)))
259 .collect(),
260 );
261 let mut terminal = Terminal::new(backend).unwrap();
262 state.current_index = 15;
263 state.scroll_offset = 10;
264 terminal.draw(|f| {
265 super::render(&state, f);
266 })?;
267 Ok(())
268 }
269}

Callers

nothing calls this directly

Calls 1

renderFunction · 0.85

Tested by

no test coverage detected