summaryrefslogtreecommitdiff
path: root/src/testdir/test87.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/test87.in
parent1dc28783fa3f5946238b4c8020aea460db80269b (diff)
downloadvim-cac867ad1836d0bc44403f66a3367afffda76095.zip
updated for version 7.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/test87.in')
-rw-r--r--src/testdir/test87.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/testdir/test87.in b/src/testdir/test87.in
index c7f092040..94c1ab535 100644
--- a/src/testdir/test87.in
+++ b/src/testdir/test87.in
@@ -622,6 +622,22 @@ for b in vim.buffers:
EOF
:tabonly!
:only!
+:"
+:" Test types
+py3 << 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()