editor: Add delete line command. (ctrl-k)
This commit is contained in:
parent
c66f79ea3d
commit
5e23b974f7
2 changed files with 20 additions and 1 deletions
|
|
@ -150,6 +150,17 @@ class EditorTestCase(unittest.TestCase):
|
|||
(self.editor.join_lines, "ab- -cd ", (0, 0)),
|
||||
(self.editor.join_lines, "ab- -cd ", (0, 0))])
|
||||
|
||||
def test_delete_line(self):
|
||||
text = "a \ndef"
|
||||
self._set_editor(text, (1, 0))
|
||||
self._assert_changes([(self.editor.delete_line, "adef", (1, 0)),
|
||||
(self.editor.delete_line, "a", (1, 0))])
|
||||
text = "\nabc"
|
||||
self._set_editor(text, (0, 0))
|
||||
self._assert_changes([(self.editor.delete_line, "abc", (0, 0)),
|
||||
(self.editor.delete_line, "", (0, 0)),
|
||||
(self.editor.delete_line, "", (0, 0))])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue