summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-02-28 20:13:18 +0100
committerBram Moolenaar <Bram@vim.org>2016-02-28 20:13:18 +0100
commit29e1951e14907b62797554ad0cc85cbbe75a1be4 (patch)
tree742fb25c77b9c276ed3c95cee5ba71d87f88f330
parentfc2457e21d136cb366076edd448e67c9732dc40a (diff)
downloadvim-git-29e1951e14907b62797554ad0cc85cbbe75a1be4.tar.gz
patch 7.4.1456v7.4.1456
Problem: Test 87 fails with Python 3.5. Solution: Work around difference. (Taro Muraoka)
-rw-r--r--src/testdir/test87.in8
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 1 deletions
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index 154e82382..535a14378 100644
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -228,6 +228,8 @@ def ee(expr, g=globals(), l=locals()):
cb.append(expr + ':' + repr((e.__class__, TypeError(msg))))
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:
@@ -264,13 +266,17 @@ EOF
:let messages=[]
:delfunction DictNew
py3 <<EOF
+import sys
d=vim.bindeval('{}')
m=vim.bindeval('messages')
def em(expr, g=globals(), l=locals()):
try:
exec(expr, g, l)
except Exception as e:
- m.extend([e.__class__.__name__])
+ if sys.version_info >= (3, 5) and e.__class__ is ValueError and str(e) == 'embedded null byte':
+ m.extend([TypeError.__name__])
+ else:
+ m.extend([e.__class__.__name__])
em('d["abc1"]')
em('d["abc1"]="\\0"')
diff --git a/src/version.c b/src/version.c
index 17d42ce56..923256b39 100644
--- a/src/version.c
+++ b/src/version.c
@@ -744,6 +744,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1456,
+/**/
1455,
/**/
1454,