mirror of
https://github.com/vim/vim.git
synced 2025-11-06 10:07:45 -05:00
updated for version 7.3.948
Problem: Cannot build with Python 2.2
Solution: Make Python interface work with Python 2.2
Make 2.2 the first supported version. (ZyX)
This commit is contained in:
@@ -183,38 +183,21 @@ STARTTEST
|
||||
: $put ='[0.0, 0.0]'
|
||||
:endif
|
||||
:let messages=[]
|
||||
:py <<EOF
|
||||
py <<EOF
|
||||
d=vim.bindeval('{}')
|
||||
m=vim.bindeval('messages')
|
||||
try:
|
||||
d['abc']
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
def em(expr, g=globals(), l=locals()):
|
||||
try:
|
||||
exec(expr, g, l)
|
||||
except:
|
||||
m.extend([sys.exc_type.__name__])
|
||||
|
||||
try:
|
||||
d['abc']="\0"
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['abc']=vim
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d['a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
|
||||
try:
|
||||
d[b'a\0b']=1
|
||||
except Exception as e:
|
||||
m.extend([e.__class__.__name__])
|
||||
em('d["abc"]')
|
||||
em('d["abc"]="\\0"')
|
||||
em('d["abc"]=vim')
|
||||
em('d[""]=1')
|
||||
em('d["a\\0b"]=1')
|
||||
em('d[u"a\\0b"]=1')
|
||||
EOF
|
||||
:$put =messages
|
||||
:unlet messages
|
||||
@@ -394,14 +377,14 @@ py << EOF
|
||||
def e(s, g=globals(), l=locals()):
|
||||
try:
|
||||
exec(s, g, l)
|
||||
except Exception as e:
|
||||
vim.command('throw ' + repr(e.__class__.__name__))
|
||||
except:
|
||||
vim.command('throw ' + repr(sys.exc_type.__name__))
|
||||
|
||||
def ev(s, g=globals(), l=locals()):
|
||||
try:
|
||||
return eval(s, g, l)
|
||||
except Exception as e:
|
||||
vim.command('throw ' + repr(e.__class__.__name__))
|
||||
except:
|
||||
vim.command('throw ' + repr(sys.exc_type.__name__))
|
||||
return 0
|
||||
EOF
|
||||
:function E(s)
|
||||
|
||||
@@ -82,7 +82,6 @@ def
|
||||
bar
|
||||
>>> paste
|
||||
p/gopts1: False
|
||||
inv: 2! ValueError
|
||||
p/wopts1! KeyError
|
||||
inv: 2! KeyError
|
||||
wopts1! KeyError
|
||||
@@ -224,7 +223,6 @@ bar
|
||||
wopts2! KeyError
|
||||
wopts3! KeyError
|
||||
p/bopts1: False
|
||||
inv: 2! ValueError
|
||||
G: 0
|
||||
W: 1:0 2:1 3:0 4:1
|
||||
B: 1:0 2:1 3:0 4:1
|
||||
@@ -280,7 +278,6 @@ bar
|
||||
wopts2! KeyError
|
||||
wopts3! KeyError
|
||||
p/bopts1: False
|
||||
inv: 2! ValueError
|
||||
G: 0
|
||||
W: 1:0 2:1 3:0 4:1
|
||||
B: 1:0 2:1 3:0 4:1
|
||||
|
||||
@@ -71,7 +71,6 @@ def
|
||||
bar
|
||||
>>> paste
|
||||
p/gopts1: False
|
||||
inv: 2! ValueError
|
||||
p/wopts1! KeyError
|
||||
inv: 2! KeyError
|
||||
wopts1! KeyError
|
||||
@@ -213,7 +212,6 @@ bar
|
||||
wopts2! KeyError
|
||||
wopts3! KeyError
|
||||
p/bopts1: False
|
||||
inv: 2! ValueError
|
||||
G: 0
|
||||
W: 1:0 2:1 3:0 4:1
|
||||
B: 1:0 2:1 3:0 4:1
|
||||
@@ -269,7 +267,6 @@ bar
|
||||
wopts2! KeyError
|
||||
wopts3! KeyError
|
||||
p/bopts1: False
|
||||
inv: 2! ValueError
|
||||
G: 0
|
||||
W: 1:0 2:1 3:0 4:1
|
||||
B: 1:0 2:1 3:0 4:1
|
||||
|
||||
Reference in New Issue
Block a user