()
| 826 | |
| 827 | #[test] |
| 828 | fn test_insert_before_last_character() { |
| 829 | let mut cb = MockConsole::default(); |
| 830 | cb.set_size_chars(yx(10, 40)); |
| 831 | let mut ob = OutputBuilder::new(yx(10, 40)); |
| 832 | ob = ob.refresh(linecol(0, 0), &[""], yx(0, 0)); |
| 833 | |
| 834 | cb.add_input_chars("abc"); |
| 835 | ob = ob.set_dirty(); |
| 836 | ob = ob.add(CapturedOut::Write("a".to_string())); |
| 837 | ob = ob.quick_refresh(linecol(0, 1), yx(0, 1)); |
| 838 | ob = ob.add(CapturedOut::Write("b".to_string())); |
| 839 | ob = ob.quick_refresh(linecol(0, 2), yx(0, 2)); |
| 840 | ob = ob.add(CapturedOut::Write("c".to_string())); |
| 841 | ob = ob.quick_refresh(linecol(0, 3), yx(0, 3)); |
| 842 | |
| 843 | cb.add_input_keys(&[Key::ArrowLeft]); |
| 844 | ob = ob.quick_refresh(linecol(0, 2), yx(0, 2)); |
| 845 | |
| 846 | cb.add_input_chars("d"); |
| 847 | ob = ob.refresh_line(linecol(0, 3), "abdc", yx(0, 3)); |
| 848 | |
| 849 | run_editor("", "abdc\n", cb, ob); |
| 850 | } |
| 851 | |
| 852 | #[test] |
| 853 | fn test_insert_newline_in_middle() { |
nothing calls this directly
no test coverage detected