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

Function test_insert_before_previous_content

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

Source from the content-addressed store, hash-verified

803
804 #[test]
805 fn test_insert_before_previous_content() {
806 let mut cb = MockConsole::default();
807 cb.set_size_chars(yx(10, 40));
808 let mut ob = OutputBuilder::new(yx(10, 40));
809 ob = ob.refresh(linecol(0, 0), &["previous content"], yx(0, 0));
810
811 cb.add_input_chars("a");
812 ob = ob.set_dirty();
813 ob = ob.refresh_line(linecol(0, 1), "aprevious content", yx(0, 1));
814
815 cb.add_input_chars("b");
816 ob = ob.refresh_line(linecol(0, 2), "abprevious content", yx(0, 2));
817
818 cb.add_input_chars("c");
819 ob = ob.refresh_line(linecol(0, 3), "abcprevious content", yx(0, 3));
820
821 cb.add_input_chars(" ");
822 ob = ob.refresh_line(linecol(0, 4), "abc previous content", yx(0, 4));
823
824 run_editor("previous content", "abc previous content\n", cb, ob);
825 }
826
827 #[test]
828 fn test_insert_before_last_character() {

Callers

nothing calls this directly

Calls 8

yxFunction · 0.85
linecolFunction · 0.85
run_editorFunction · 0.85
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