summaryrefslogtreecommitdiff
path: root/src/testdir/test86.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-09-09 14:59:39 +0200
committerBram Moolenaar <Bram@vim.org>2016-09-09 14:59:39 +0200
commitcf703fe9d66744ffd7d9c625ee1cbe048ee07740 (patch)
tree5042b79834702f9c4c48c118596385474c1153be /src/testdir/test86.in
parent2321ca2a78286bc026fa7f407281ddbeb04114bb (diff)
downloadvim-git-cf703fe9d66744ffd7d9c625ee1cbe048ee07740.tar.gz
patch 7.4.2350v7.4.2350
Problem: Test 86 and 87 fail with some version of Python. Solution: Unify "can't" and "cannot". Unify quotes.
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r--src/testdir/test86.in8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index bf7b3d31c..71dd9f1fd 100644
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -239,6 +239,14 @@ def ee(expr, g=globals(), l=locals()):
'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\',)',