File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,18 @@ def test_get_last_word(self):
5959 self .repl .get_last_word ()
6060 self .assertEqual (self .repl .current_line ,'abcde3' )
6161
62+ @skip # this is the behavior of bash - not currently implemented
63+ def test_get_last_word_with_prev_line
64+ self .repl .rl_history .entries = ['1' ,'2 3' ,'4 5 6' ]
65+ self .repl ._set_current_line ('abcde' )
66+ self .repl .up_one_line ()
67+ self .assertEqual (self .repl .current_line ,'4 5 6' )
68+ self .repl .get_last_word ()
69+ self .assertEqual (self .repl .current_line ,'4 5 63' )
70+ self .repl .get_last_word ()
71+ self .assertEqual (self .repl .current_line ,'4 5 64' )
72+ self .repl .up_one_line ()
73+ self .assertEqual (self .repl .current_line ,'2 3' )
6274
6375@contextmanager # from http://stackoverflow.com/a/17981937/398212 - thanks @rkennedy
6476def captured_output ():
You can’t perform that action at this time.
0 commit comments