summaryrefslogtreecommitdiffstats
path: root/src/testdir/test86.in
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-05-21 19:50:34 +0200
committerBram Moolenaar <Bram@vim.org>2013-05-21 19:50:34 +0200
commitcac867ad1836d0bc44403f66a3367afffda76095 (patch)
tree2cd2989f802f817adb57440f5ef536f267bb8ca8 /src/testdir/test86.in
parent1dc28783fa3f5946238b4c8020aea460db80269b (diff)
updated for version 7.3.996v7.3.996
Problem: Python: Can't check types of what is returned by bindeval(). Solution: Add vim.List, vim.Dictionary and vim.Function types. (ZyX)
Diffstat (limited to 'src/testdir/test86.in')
-rw-r--r--src/testdir/test86.in18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/testdir/test86.in b/src/testdir/test86.in
index 6a10bd7c20..c49eb3bade 100644
--- a/src/testdir/test86.in
+++ b/src/testdir/test86.in
@@ -631,10 +631,26 @@ cb.append('Current buffer: ' + repr(vim.current.buffer))
cb.append('Current line: ' + repr(vim.current.line))
for b in vim.buffers:
if b is not cb:
- vim.command('bwipeout! ' + b.number)
+ vim.command('bwipeout! ' + str(b.number))
EOF
:tabonly!
:only!
+:"
+:" Test types
+py << EOF
+for expr, attr in (
+ ('vim.vars', 'Dictionary'),
+ ('vim.options', 'Options'),
+ ('vim.bindeval("{}")', 'Dictionary'),
+ ('vim.bindeval("[]")', 'List'),
+ ('vim.bindeval("function(\'tr\')")', 'Function'),
+ ('vim.current.buffer', 'Buffer'),
+ ('vim.current.range', 'Range'),
+ ('vim.current.window', 'Window'),
+ ('vim.current.tabpage', 'TabPage'),
+):
+ cb.append(expr + ':' + attr + ':' + repr(type(eval(expr)) is getattr(vim, attr)))
+EOF
:endfun
:"
:call Test()