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

Function test_tab_remove_before_some_text

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

Source from the content-addressed store, hash-verified

1149
1150 #[test]
1151 fn test_tab_remove_before_some_text() {
1152 let mut cb = MockConsole::default();
1153 cb.set_size_chars(yx(10, 40));
1154 let mut ob = OutputBuilder::new(yx(10, 40));
1155 ob = ob.refresh(linecol(0, 0), &[" aligned"], yx(0, 0));
1156
1157 for i in 0..10 {
1158 cb.add_input_keys(&[Key::ArrowRight]);
1159 ob = ob.quick_refresh(linecol(0, i + 1), yx(0, u16::try_from(i + 1).unwrap()));
1160 }
1161
1162 cb.add_input_keys(&[Key::Backspace]);
1163 ob = ob.set_dirty();
1164 ob = ob.refresh_line(linecol(0, 8), " aligned", yx(0, 8));
1165
1166 cb.add_input_keys(&[Key::Backspace]);
1167 ob = ob.refresh_line(linecol(0, 4), " aligned", yx(0, 4));
1168
1169 cb.add_input_keys(&[Key::Backspace]);
1170 ob = ob.refresh_line(linecol(0, 0), "aligned", yx(0, 0));
1171
1172 cb.add_input_keys(&[Key::Backspace]);
1173 ob = ob.quick_refresh(linecol(0, 0), yx(0, 0));
1174
1175 run_editor(" aligned", "aligned\n", cb, ob);
1176 }
1177
1178 fn do_delete_in_middle_of_line_test(key: Key) {
1179 let mut cb = MockConsole::default();

Callers

nothing calls this directly

Calls 9

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

Tested by

no test coverage detected