X Tutup
Skip to content

Commit ce19978

Browse files
Add tests for nop case of some readline commands
1 parent d2db693 commit ce19978

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bpython/test/test_manual_readline.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ def test_delete_from_cursor_forward(self):
144144
expected = (pos, "everything after ")
145145
result = delete_from_cursor_forward(line.find("this"), line)[:-1]
146146
self.assertEquals(expected, result)
147+
self.assertEquals(delete_from_cursor_forward(0, ''), (0, '', ''))
147148

148149
def test_delete_rest_of_word(self):
149150
self.try_stages_kill(['z|s;df asdf d s;a;a',
@@ -153,6 +154,7 @@ def test_delete_rest_of_word(self):
153154
'z| s;a;a',
154155
'z|;a;a',
155156
'z|;a',
157+
'z|',
156158
'z|'], delete_rest_of_word)
157159

158160
def test_delete_word_to_cursor(self):
@@ -163,7 +165,7 @@ def test_delete_word_to_cursor(self):
163165
' a;d |a',
164166
' |a',
165167
'|a',
166-
], delete_word_to_cursor)
168+
'|a'], delete_word_to_cursor)
167169

168170
def test_yank_prev_killed_text(self):
169171
pass
@@ -212,7 +214,8 @@ def test_delete_word_from_cursor_back(self):
212214
"asd;fljk asd;|",
213215
"asd;fljk |",
214216
"asd;|",
215-
"|"], delete_word_from_cursor_back)
217+
"|",
218+
"|"], delete_word_from_cursor_back)
216219

217220
class TestEdits(unittest.TestCase):
218221

0 commit comments

Comments
 (0)
X Tutup