blob: 6af889bf9e6528ae9d7baa9552f05f3e66a0505c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
local helpers = require('test.functional.helpers')
local clear, execute, nvim = helpers.clear, helpers.execute, helpers.nvim
local expect = helpers.expect
local feed = helpers.feed
local command = helpers.command
describe(':emenu', function()
before_each(function()
clear()
execute('nnoremenu Test.Test inormal<ESC>')
execute('inoremenu Test.Test insert')
execute('vnoremenu Test.Test x')
end)
it('executes correct bindings in normal mode without using API', function()
execute('emenu Test.Test')
expect('normal')
end)
it('executes correct bindings in normal mode', function()
command('emenu Test.Test')
expect('normal')
end)
it('executes correct bindings in insert mode', function()
feed('i')
command('emenu Test.Test')
expect('insert')
end)
it('executes correct bindings in visual mode', function()
feed('iabcde<ESC>0lvll')
command('emenu Test.Test')
expect('ae')
end)
end)
|