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

Function test_move_home_no_indent

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

Source from the content-addressed store, hash-verified

959
960 #[test]
961 fn test_move_home_no_indent() {
962 let mut cb = MockConsole::default();
963 cb.set_size_chars(yx(10, 40));
964 let mut ob = OutputBuilder::new(yx(10, 40));
965 ob = ob.refresh(linecol(0, 0), &["text"], yx(0, 0));
966
967 cb.add_input_keys(&[Key::ArrowRight]);
968 ob = ob.quick_refresh(linecol(0, 1), yx(0, 1));
969
970 cb.add_input_keys(&[Key::ArrowRight]);
971 ob = ob.quick_refresh(linecol(0, 2), yx(0, 2));
972
973 cb.add_input_keys(&[Key::Home]);
974 ob = ob.quick_refresh(linecol(0, 0), yx(0, 0));
975
976 cb.add_input_chars(".");
977 ob = ob.set_dirty();
978 ob = ob.refresh_line(linecol(0, 1), ".text", yx(0, 1));
979
980 cb.add_input_keys(&[Key::Home]);
981 ob = ob.quick_refresh(linecol(0, 0), yx(0, 0));
982
983 cb.add_input_chars(",");
984 ob = ob.refresh_line(linecol(0, 1), ",.text", yx(0, 1));
985
986 run_editor("text", ",.text\n", cb, ob);
987 }
988
989 #[test]
990 fn test_move_home_with_indent() {

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