()
| 1107 | |
| 1108 | #[test] |
| 1109 | fn test_tab_remove_empty_line() { |
| 1110 | let mut cb = MockConsole::default(); |
| 1111 | cb.set_size_chars(yx(10, 40)); |
| 1112 | let mut ob = OutputBuilder::new(yx(10, 40)); |
| 1113 | ob = ob.refresh(linecol(0, 0), &[" "], yx(0, 0)); |
| 1114 | |
| 1115 | cb.add_input_keys(&[Key::End]); |
| 1116 | ob = ob.quick_refresh(linecol(0, 10), yx(0, 10)); |
| 1117 | |
| 1118 | cb.add_input_keys(&[Key::Backspace]); |
| 1119 | ob = ob.set_dirty(); |
| 1120 | ob = ob.add(CapturedOut::HideCursor); |
| 1121 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1122 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1123 | ob = ob.add(CapturedOut::ShowCursor); |
| 1124 | ob = ob.quick_refresh(linecol(0, 8), yx(0, 8)); |
| 1125 | |
| 1126 | cb.add_input_keys(&[Key::Backspace]); |
| 1127 | ob = ob.add(CapturedOut::HideCursor); |
| 1128 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1129 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1130 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1131 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1132 | ob = ob.add(CapturedOut::ShowCursor); |
| 1133 | ob = ob.quick_refresh(linecol(0, 4), yx(0, 4)); |
| 1134 | |
| 1135 | cb.add_input_keys(&[Key::Backspace]); |
| 1136 | ob = ob.add(CapturedOut::HideCursor); |
| 1137 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1138 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1139 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1140 | ob = ob.add(CapturedOut::Clear(ClearType::PreviousChar)); |
| 1141 | ob = ob.add(CapturedOut::ShowCursor); |
| 1142 | ob = ob.quick_refresh(linecol(0, 0), yx(0, 0)); |
| 1143 | |
| 1144 | cb.add_input_keys(&[Key::Backspace]); |
| 1145 | ob = ob.quick_refresh(linecol(0, 0), yx(0, 0)); |
| 1146 | |
| 1147 | run_editor(" ", "\n", cb, ob); |
| 1148 | } |
| 1149 | |
| 1150 | #[test] |
| 1151 | fn test_tab_remove_before_some_text() { |
nothing calls this directly
no test coverage detected