()
| 1205 | |
| 1206 | #[test] |
| 1207 | fn test_delete_last_character_of_line() { |
| 1208 | let mut cb = MockConsole::default(); |
| 1209 | cb.set_size_chars(yx(10, 40)); |
| 1210 | let mut ob = OutputBuilder::new(yx(10, 40)); |
| 1211 | ob = ob.refresh(linecol(0, 0), &["sample"], yx(0, 0)); |
| 1212 | |
| 1213 | for i in 0..5u16 { |
| 1214 | cb.add_input_keys(&[Key::ArrowRight]); |
| 1215 | ob = ob.quick_refresh(linecol(0, usize::from(i + 1)), yx(0, i + 1)); |
| 1216 | } |
| 1217 | |
| 1218 | cb.add_input_keys(&[Key::Delete]); |
| 1219 | ob = ob.set_dirty(); |
| 1220 | ob = ob.add(CapturedOut::HideCursor); |
| 1221 | ob = ob.add(CapturedOut::Clear(ClearType::UntilNewLine)); |
| 1222 | ob = ob.add(CapturedOut::ShowCursor); |
| 1223 | ob = ob.quick_refresh(linecol(0, 5), yx(0, 5)); |
| 1224 | |
| 1225 | run_editor("sample\n", "sampl\n", cb, ob); |
| 1226 | } |
| 1227 | |
| 1228 | fn do_delete_joins_with_next_line_test(key: Key) { |
| 1229 | let mut cb = MockConsole::default(); |
nothing calls this directly
no test coverage detected