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

Function test_draw_edit_mode

src/interactive/view.rs:217–227  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

215
216 #[test]
217 fn test_draw_edit_mode() -> io::Result<()> {
218 let backend = TestBackend::new(80, 30);
219 let mut state = AppState::new(vec![("VAR1".to_string(), "VALUE1".to_string())]);
220 let mut terminal = Terminal::new(backend).unwrap();
221 state.mode = Mode::Edit("VAR1".to_string());
222 state.input_value = "EDITED_VALUE".to_string();
223 terminal.draw(|f| {
224 super::render(&state, f);
225 })?;
226 Ok(())
227 }
228
229 #[test]
230 fn test_draw_delete_mode() -> io::Result<()> {

Callers

nothing calls this directly

Calls 1

renderFunction · 0.85

Tested by

no test coverage detected