0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.1173

Problem:    Python 2 tests don't have the same output everywhere.
Solution:   Make the Python 2 tests more portable. (ZyX)
This commit is contained in:
Bram Moolenaar 2013-06-12 14:26:26 +02:00
parent 9f3685a527
commit 27610ed76c
3 changed files with 415 additions and 402 deletions

View File

@ -45,9 +45,10 @@ d.update({'0': -1})
dk = d.keys() dk = d.keys()
dv = d.values() dv = d.values()
di = d.items() di = d.items()
dk.sort(key=repr) cmpfun = lambda a, b: cmp(repr(a), repr(b))
dv.sort(key=repr) dk.sort(cmpfun)
di.sort(key=repr) dv.sort(cmpfun)
di.sort(cmpfun)
EOF EOF
:$put =pyeval('d[''f''](self={})') :$put =pyeval('d[''f''](self={})')
:$put =pyeval('repr(dk)') :$put =pyeval('repr(dk)')
@ -813,7 +814,17 @@ def ee(expr, g=globals(), l=locals()):
try: try:
exec(expr, g, l) exec(expr, g, l)
except: except:
cb.append(expr + ':' + repr(sys.exc_info()[:2])) ei = sys.exc_info()
msg = sys.exc_info()[0].__name__ + ':' + repr(sys.exc_info()[1].args)
msg = msg.replace('TypeError:(\'argument 1 ', 'TypeError:(\'')
if expr.find('None') > -1:
msg = msg.replace('TypeError:(\'iteration over non-sequence\',)',
'TypeError:("\'NoneType\' object is not iterable",)')
if expr == 'fd(self=[])':
# HACK: PyMapping_Check changed meaning
msg = msg.replace('AttributeError:(\'keys\',)',
'TypeError:(\'unable to convert object to vim dictionary\',)')
cb.append(expr + ':' + msg)
else: else:
cb.append(expr + ':NOT FAILED') cb.append(expr + ':NOT FAILED')
d = vim.Dictionary() d = vim.Dictionary()

File diff suppressed because it is too large Load Diff

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1173,
/**/ /**/
1172, 1172,
/**/ /**/