aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/091_context_variables_spec.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2017-02-27 10:29:46 +0100
committerGitHub <noreply@github.com>2017-02-27 10:29:46 +0100
commitc318d8e672a3b1dfe4ba7954dbca61c509c2b99c (patch)
tree282a6090dbf2d9017a3ad0a7382df08b2d320a05 /test/functional/legacy/091_context_variables_spec.lua
parent8c8ce1832e780f87b2922ba3acf0d44f78c50931 (diff)
parenta85021068de95ef7c69b3b93b31bc32fbb154ed3 (diff)
downloadrneovim-c318d8e672a3b1dfe4ba7954dbca61c509c2b99c.tar.gz
rneovim-c318d8e672a3b1dfe4ba7954dbca61c509c2b99c.tar.bz2
rneovim-c318d8e672a3b1dfe4ba7954dbca61c509c2b99c.zip
Merge #6112 from ZyX-I/split-eval'/buf_get_changedtick
Better b:changedtick support
Diffstat (limited to 'test/functional/legacy/091_context_variables_spec.lua')
-rw-r--r--test/functional/legacy/091_context_variables_spec.lua20
1 files changed, 14 insertions, 6 deletions
diff --git a/test/functional/legacy/091_context_variables_spec.lua b/test/functional/legacy/091_context_variables_spec.lua
index edf497d397..c08a58e14b 100644
--- a/test/functional/legacy/091_context_variables_spec.lua
+++ b/test/functional/legacy/091_context_variables_spec.lua
@@ -13,6 +13,14 @@ describe('context variables', function()
-- Test for getbufvar().
-- Use strings to test for memory leaks.
source([[
+ function Getbufscope(buf, ...)
+ let ret = call('getbufvar', [a:buf, ''] + a:000)
+ if type(ret) == type({})
+ return filter(copy(ret), 'v:key isnot# "changedtick"')
+ else
+ return ret
+ endif
+ endfunction
let t:testvar='abcd'
$put =string(gettabvar(1, 'testvar'))
$put =string(gettabvar(1, 'testvar'))
@@ -20,14 +28,14 @@ describe('context variables', function()
let def_num = '5678'
$put =string(getbufvar(1, 'var_num'))
$put =string(getbufvar(1, 'var_num', def_num))
- $put =string(getbufvar(1, ''))
- $put =string(getbufvar(1, '', def_num))
+ $put =string(Getbufscope(1))
+ $put =string(Getbufscope(1, def_num))
unlet b:var_num
$put =string(getbufvar(1, 'var_num', def_num))
- $put =string(getbufvar(1, ''))
- $put =string(getbufvar(1, '', def_num))
- $put =string(getbufvar(9, ''))
- $put =string(getbufvar(9, '', def_num))
+ $put =string(Getbufscope(1))
+ $put =string(Getbufscope(1, def_num))
+ $put =string(Getbufscope(9))
+ $put =string(Getbufscope(9, def_num))
unlet def_num
$put =string(getbufvar(1, '&autoindent'))
$put =string(getbufvar(1, '&autoindent', 1))