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

Function test_tab_append

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

Source from the content-addressed store, hash-verified

1067
1068 #[test]
1069 fn test_tab_append() {
1070 let mut cb = MockConsole::default();
1071 cb.set_size_chars(yx(10, 40));
1072 let mut ob = OutputBuilder::new(yx(10, 40));
1073 ob = ob.refresh(linecol(0, 0), &[""], yx(0, 0));
1074
1075 cb.add_input_keys(&[Key::Tab]);
1076 ob = ob.set_dirty();
1077 ob = ob.add(CapturedOut::Write(" ".to_string()));
1078 ob = ob.quick_refresh(linecol(0, 4), yx(0, 4));
1079
1080 cb.add_input_chars("x");
1081 ob = ob.add(CapturedOut::Write("x".to_string()));
1082 ob = ob.quick_refresh(linecol(0, 5), yx(0, 5));
1083
1084 cb.add_input_keys(&[Key::Tab]);
1085 ob = ob.add(CapturedOut::Write(" ".to_string()));
1086 ob = ob.quick_refresh(linecol(0, 8), yx(0, 8));
1087
1088 run_editor("", " x \n", cb, ob);
1089 }
1090
1091 #[test]
1092 fn test_tab_existing_content() {

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
set_dirtyMethod · 0.80
addMethod · 0.80
quick_refreshMethod · 0.80
set_size_charsMethod · 0.45
add_input_charsMethod · 0.45

Tested by

no test coverage detected