mirror of
https://github.com/wassname/pyreadline.git
synced 2026-06-27 16:10:38 +08:00
Fix failure in unit test of vi mode
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
||||
SET VERSION=1.6
|
||||
SET VERSION=1.7
|
||||
python setup.py build_sphinx
|
||||
python setup.py build_sphinx -b latex
|
||||
|
||||
|
||||
@@ -327,6 +327,7 @@ class ViCommand:
|
||||
self.readline._vi_multiplier2 = ''
|
||||
self.set_override_multiplier (0)
|
||||
self.skip_multipler = False
|
||||
self.tabstop = 4
|
||||
self.dct_fcn = {
|
||||
ord('$') : self.key_dollar,
|
||||
ord('^') : self.key_hat,
|
||||
|
||||
@@ -56,6 +56,10 @@ class Event:
|
||||
self.char=u'\x1b'
|
||||
elif char==u"backspace":
|
||||
self.char=u'\x08'
|
||||
elif char==u"tab":
|
||||
self.char=u'\t'
|
||||
elif char==u"space":
|
||||
self.char=u' '
|
||||
else:
|
||||
self.char = char
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ class ViModeTest (ViMode):
|
||||
self.vi_set_insert_mode (True)
|
||||
self.lst_completions = []
|
||||
self.completer = self.mock_completer
|
||||
self.completer_delims = u' u'
|
||||
self.completer_delims = u' '
|
||||
self.tabstop = 4
|
||||
|
||||
def get_mock_console (self):
|
||||
@@ -52,8 +52,8 @@ class ViModeTest (ViMode):
|
||||
lst_key = [keytext]
|
||||
for key in lst_key:
|
||||
keyinfo, event = keytext_to_keyinfo_and_event (key)
|
||||
dispatch_func = self.key_dispatch.get( keyinfo.tuple(),self.vi_key)
|
||||
self.tested_commands[dispatch_func.__name__]=dispatch_func
|
||||
dispatch_func = self.key_dispatch.get(keyinfo.tuple(), self.vi_key)
|
||||
self.tested_commands[dispatch_func.__name__] = dispatch_func
|
||||
dispatch_func (event)
|
||||
|
||||
def vi_accept_line (self, e):
|
||||
|
||||
Reference in New Issue
Block a user