diff options
Diffstat (limited to 'test/functional')
-rw-r--r-- | test/functional/editor/mode_normal_spec.lua | 22 | ||||
-rw-r--r-- | test/functional/lua/luaeval_spec.lua | 2 |
2 files changed, 24 insertions, 0 deletions
diff --git a/test/functional/editor/mode_normal_spec.lua b/test/functional/editor/mode_normal_spec.lua new file mode 100644 index 0000000000..89bab3f6c9 --- /dev/null +++ b/test/functional/editor/mode_normal_spec.lua @@ -0,0 +1,22 @@ +-- Normal mode tests. + +local helpers = require('test.functional.helpers')(after_each) +local clear = helpers.clear +local feed = helpers.feed +local fn = helpers.fn +local command = helpers.command +local eq = helpers.eq + +describe('Normal mode', function() + before_each(clear) + + it('setting &winhighlight or &winblend does not change curswant #27470', function() + fn.setline(1, { 'long long lone line', 'short line' }) + feed('ggfi') + local pos = fn.getcurpos() + feed('j') + command('setlocal winblend=10 winhighlight=Visual:Search') + feed('k') + eq(pos, fn.getcurpos()) + end) +end) diff --git a/test/functional/lua/luaeval_spec.lua b/test/functional/lua/luaeval_spec.lua index 171d37ba55..b28cfa4dd2 100644 --- a/test/functional/lua/luaeval_spec.lua +++ b/test/functional/lua/luaeval_spec.lua @@ -538,6 +538,8 @@ describe('v:lua', function() eq('\tbadval', eval("v:lua.require'leftpad'('badval')")) eq(9003, eval("v:lua.require'bar'.doit()")) eq(9004, eval("v:lua.require'baz-quux'.doit()")) + eq(9003, eval("1 ? v:lua.require'bar'.doit() : v:lua.require'baz-quux'.doit()")) + eq(9004, eval("0 ? v:lua.require'bar'.doit() : v:lua.require'baz-quux'.doit()")) end) it('throw errors for invalid use', function() |