diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/api/extmark_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/ui/bufhl_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/ui/popupmenu_spec.lua | 50 |
3 files changed, 63 insertions, 1 deletions
diff --git a/test/functional/api/extmark_spec.lua b/test/functional/api/extmark_spec.lua index 3f79515949..3f96efd4ef 100644 --- a/test/functional/api/extmark_spec.lua +++ b/test/functional/api/extmark_spec.lua @@ -1446,13 +1446,20 @@ describe('API/extmarks', function() end_col = 0, end_line = 1 }) - eq({ {1, 0, 0, { end_col = 0, end_row = 1 }} }, get_extmarks(ns, 0, -1, {details=true})) + eq({ {1, 0, 0, { + end_col = 0, + end_row = 1, + right_gravity = true, + end_right_gravity = false, + }} }, get_extmarks(ns, 0, -1, {details=true})) end) it('can get details', function() set_extmark(ns, marks[1], 0, 0, { end_col = 0, end_row = 1, + right_gravity = false, + end_right_gravity = true, priority = 0, hl_eol = true, hl_mode = "blend", @@ -1472,6 +1479,8 @@ describe('API/extmarks', function() eq({0, 0, { end_col = 0, end_row = 1, + right_gravity = false, + end_right_gravity = true, priority = 0, hl_eol = true, hl_mode = "blend", @@ -1484,6 +1493,7 @@ describe('API/extmarks', function() virt_lines_leftcol = true, } }, get_extmark_by_id(ns, marks[1], { details = true })) eq({0, 0, { + right_gravity = true, priority = 0, virt_text = { { "text", "Statement" } }, virt_text_hide = false, diff --git a/test/functional/ui/bufhl_spec.lua b/test/functional/ui/bufhl_spec.lua index 7716414e87..9f84b71ece 100644 --- a/test/functional/ui/bufhl_spec.lua +++ b/test/functional/ui/bufhl_spec.lua @@ -759,6 +759,7 @@ describe('Buffer highlighting', function() priority = 0, virt_text = s1, -- other details + right_gravity = true, virt_text_pos = 'eol', virt_text_hide = false, }}}, get_extmarks(id1, {0,0}, {0, -1}, {details=true})) @@ -770,6 +771,7 @@ describe('Buffer highlighting', function() priority = 0, virt_text = s2, -- other details + right_gravity = true, virt_text_pos = 'eol', virt_text_hide = false, }}}, get_extmarks(id1, {lastline,0}, {lastline, -1}, {details=true})) diff --git a/test/functional/ui/popupmenu_spec.lua b/test/functional/ui/popupmenu_spec.lua index 84bf28e83e..c44e59cfd3 100644 --- a/test/functional/ui/popupmenu_spec.lua +++ b/test/functional/ui/popupmenu_spec.lua @@ -26,6 +26,7 @@ describe('ui/ext_popupmenu', function() [5] = {bold = true, foreground = Screen.colors.SeaGreen}, [6] = {background = Screen.colors.WebGray}, [7] = {background = Screen.colors.LightMagenta}, + [8] = {foreground = Screen.colors.Red}, }) source([[ function! TestComplete() abort @@ -426,6 +427,55 @@ describe('ui/ext_popupmenu', function() {1:~ }| {2:-- INSERT --} | ]]) + + feed('<esc>ddiaa bb cc<cr>') + feed('<c-x><c-n>') + screen:expect([[ + aa bb cc | + aa^ | + {6:aa }{1: }| + {7:bb }{1: }| + {7:cc }{1: }| + {1:~ }| + {1:~ }| + {2:-- Keyword Local completion (^N^P) }{5:match 1 of 3} | + ]]) + + feed('<f1>') + screen:expect([[ + aa bb cc | + cc^ | + {7:aa }{1: }| + {7:bb }{1: }| + {6:cc }{1: }| + {1:~ }| + {1:~ }| + {2:-- Keyword Local completion (^N^P) }{5:match 3 of 3} | + ]]) + + feed('<f2>') + screen:expect([[ + aa bb cc | + cc^ | + {7:aa }{1: }| + {7:bb }{1: }| + {7:cc }{1: }| + {1:~ }| + {1:~ }| + {2:-- Keyword Local completion (^N^P) }{8:Back at original} | + ]]) + + feed('<f3>') + screen:expect([[ + aa bb cc | + bb^ | + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {1:~ }| + {2:-- INSERT --} | + ]]) end) local function source_complete_month() |