aboutsummaryrefslogtreecommitdiff
path: root/test/functional/legacy/091_context_variables_spec.lua
diff options
context:
space:
mode:
authorZyX <kp-pav@yandex.ru>2017-02-15 02:00:45 +0300
committerZyX <kp-pav@yandex.ru>2017-02-23 19:46:44 +0300
commit4f10d42f829da51cd79ff756ac4db96a6532dbac (patch)
tree9623e92dd5395a0516916534b447e3680fe33c88 /test/functional/legacy/091_context_variables_spec.lua
parent0eab7ac4b98d9a29e9713251a0402b5fbc37355e (diff)
downloadrneovim-4f10d42f829da51cd79ff756ac4db96a6532dbac.tar.gz
rneovim-4f10d42f829da51cd79ff756ac4db96a6532dbac.tar.bz2
rneovim-4f10d42f829da51cd79ff756ac4db96a6532dbac.zip
buffer: Bind b:changedtick to b:['changedtick'], remove special cases
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))