Patch 7.4.2350
Problem: Test 86 and 87 fail with some version of Python.
Solution: Unify "can't" and "cannot". Unify quotes.
Files: src/testdir/test86.in, src/testdir/test86.ok,
src/testdir/test87.in, src/testdir/test87.ok
*** ../vim-7.4.2349/src/testdir/test86.in 2016-05-25 20:38:49.757864614
+0200
--- src/testdir/test86.in 2016-09-09 14:40:40.015309142 +0200
***************
*** 239,244 ****
--- 239,252 ----
'TypeError:("\'FailingNumber\' object is not
iterable",)')
if msg.find('(\'\'') > -1 or msg.find('(\'can\'t') > -1:
msg = msg.replace('(\'', '("').replace('\',)', '",)')
+ # Some Python versions say can't, others cannot.
+ if msg.find('can\'t') > -1:
+ msg = msg.replace('can\'t', 'cannot')
+ # Some Python versions use single quote, some double quote
+ if msg.find('"cannot ') > -1:
+ msg = msg.replace('"cannot ', '\'cannot ')
+ if msg.find(' attributes"') > -1:
+ msg = msg.replace(' attributes"', ' attributes\'')
if expr == 'fd(self=[])':
# HACK: PyMapping_Check changed meaning
msg = msg.replace('AttributeError:(\'keys\',)',
*** ../vim-7.4.2349/src/testdir/test86.ok 2016-05-31 22:31:19.778640756
+0200
--- src/testdir/test86.ok 2016-09-06 23:21:07.586841782 +0200
***************
*** 628,634 ****
test86.in
> Output
>> OutputSetattr
! del sys.stdout.softspace:AttributeError:("can't delete OutputObject
attributes",)
>>> Testing NumberToLong using sys.stdout.softspace = %s
sys.stdout.softspace = []:TypeError:('expected int(), long() or something
supporting coercing to long(), but got list',)
sys.stdout.softspace = None:TypeError:('expected int(), long() or something
supporting coercing to long(), but got NoneType',)
--- 628,634 ----
test86.in
> Output
>> OutputSetattr
! del sys.stdout.softspace:AttributeError:('cannot delete OutputObject
attributes',)
>>> Testing NumberToLong using sys.stdout.softspace = %s
sys.stdout.softspace = []:TypeError:('expected int(), long() or something
supporting coercing to long(), but got list',)
sys.stdout.softspace = None:TypeError:('expected int(), long() or something
supporting coercing to long(), but got NoneType',)
*** ../vim-7.4.2349/src/testdir/test87.in 2016-05-25 20:38:49.757864614
+0200
--- src/testdir/test87.in 2016-09-09 14:57:15.943889362 +0200
***************
*** 238,246 ****
else:
cb.append(expr + ':' + repr((e.__class__, e)))
elif sys.version_info >= (3, 5) and e.__class__ is ValueError and
str(e) == 'embedded null byte':
! msg = cb.append(expr + ':' + repr((TypeError,
TypeError('expected bytes with no null'))))
else:
! cb.append(expr + ':' + repr((e.__class__, e)))
else:
cb.append(expr + ':NOT FAILED')
except Exception as e:
--- 238,255 ----
else:
cb.append(expr + ':' + repr((e.__class__, e)))
elif sys.version_info >= (3, 5) and e.__class__ is ValueError and
str(e) == 'embedded null byte':
! cb.append(expr + ':' + repr((TypeError, TypeError('expected
bytes with no null'))))
else:
! msg = repr((e.__class__, e))
! # Some Python versions say can't, others cannot.
! if msg.find('can\'t') > -1:
! msg = msg.replace('can\'t', 'cannot')
! # Some Python versions use single quote, some double quote
! if msg.find('"cannot ') > -1:
! msg = msg.replace('"cannot ', '\'cannot ')
! if msg.find(' attributes"') > -1:
! msg = msg.replace(' attributes"', ' attributes\'')
! cb.append(expr + ':' + msg)
else:
cb.append(expr + ':NOT FAILED')
except Exception as e:
*** ../vim-7.4.2349/src/testdir/test87.ok 2016-05-31 22:31:19.778640756
+0200
--- src/testdir/test87.ok 2016-09-09 14:57:25.769427204 +0200
***************
*** 628,634 ****
test87.in
> Output
>> OutputSetattr
! del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError("can't
delete OutputObject attributes",))
>>> Testing NumberToLong using sys.stdout.softspace = %s
sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('expected int() or
something supporting coercing to int(), but got list',))
sys.stdout.softspace = None:(<class 'TypeError'>, TypeError('expected int()
or something supporting coercing to int(), but got NoneType',))
--- 628,634 ----
test87.in
> Output
>> OutputSetattr
! del sys.stdout.softspace:(<class 'AttributeError'>, AttributeError('cannot
delete OutputObject attributes',))
>>> Testing NumberToLong using sys.stdout.softspace = %s
sys.stdout.softspace = []:(<class 'TypeError'>, TypeError('expected int() or
something supporting coercing to int(), but got list',))
sys.stdout.softspace = None:(<class 'TypeError'>, TypeError('expected int()
or something supporting coercing to int(), but got NoneType',))
*** ../vim-7.4.2349/src/version.c 2016-09-09 14:17:14.090830202 +0200
--- src/version.c 2016-09-09 14:58:41.436357441 +0200
***************
*** 765,766 ****
--- 765,768 ----
{ /* Add new patch number below this line */
+ /**/
+ 2350,
/**/
--
hundred-and-one symptoms of being an internet addict:
212. Your Internet group window has more icons than your Accessories window.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.