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

Function test_move_home_with_indent

repl/src/editor.rs:990–1019  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

988
989 #[test]
990 fn test_move_home_with_indent() {
991 let mut cb = MockConsole::default();
992 cb.set_size_chars(yx(10, 40));
993 let mut ob = OutputBuilder::new(yx(10, 40));
994 ob = ob.refresh(linecol(0, 0), &[" text"], yx(0, 0));
995
996 cb.add_input_keys(&[Key::Home]);
997 ob = ob.quick_refresh(linecol(0, 2), yx(0, 2));
998
999 cb.add_input_keys(&[Key::Home]);
1000 ob = ob.quick_refresh(linecol(0, 0), yx(0, 0));
1001
1002 cb.add_input_keys(&[Key::ArrowRight]);
1003 ob = ob.quick_refresh(linecol(0, 1), yx(0, 1));
1004
1005 cb.add_input_keys(&[Key::Home]);
1006 ob = ob.quick_refresh(linecol(0, 2), yx(0, 2));
1007
1008 cb.add_input_keys(&[Key::ArrowRight]);
1009 ob = ob.quick_refresh(linecol(0, 3), yx(0, 3));
1010
1011 cb.add_input_keys(&[Key::Home]);
1012 ob = ob.quick_refresh(linecol(0, 2), yx(0, 2));
1013
1014 cb.add_input_chars(".");
1015 ob = ob.set_dirty();
1016 ob = ob.refresh_line(linecol(0, 3), " .text", yx(0, 3));
1017
1018 run_editor(" text", " .text\n", cb, ob);
1019 }
1020
1021 #[test]
1022 fn test_move_page_down_up() {

Callers

nothing calls this directly

Calls 10

yxFunction · 0.85
linecolFunction · 0.85
run_editorFunction · 0.85
refreshMethod · 0.80
add_input_keysMethod · 0.80
quick_refreshMethod · 0.80
set_dirtyMethod · 0.80
refresh_lineMethod · 0.80
set_size_charsMethod · 0.45
add_input_charsMethod · 0.45

Tested by

no test coverage detected