diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/functional/legacy/search_spec.lua | 69 | ||||
| -rw-r--r-- | test/functional/ui/cursor_spec.lua | 17 | ||||
| -rw-r--r-- | test/functional/ui/inccommand_spec.lua | 2 |
3 files changed, 87 insertions, 1 deletions
diff --git a/test/functional/legacy/search_spec.lua b/test/functional/legacy/search_spec.lua index a207b176d3..bb039a585c 100644 --- a/test/functional/legacy/search_spec.lua +++ b/test/functional/legacy/search_spec.lua @@ -21,6 +21,7 @@ describe('search cmdline', function() err = { foreground = Screen.colors.Grey100, background = Screen.colors.Red }, more = { bold = true, foreground = Screen.colors.SeaGreen4 }, tilde = { bold = true, foreground = Screen.colors.Blue1 }, + hl = { background = Screen.colors.Yellow }, }) end) @@ -570,4 +571,72 @@ describe('search cmdline', function() ?the | ]]) end) + + it('incsearch works with :sort', function() + -- oldtest: Test_incsearch_sort_dump(). + screen:try_resize(20, 4) + command('set incsearch hlsearch scrolloff=0') + funcs.setline(1, {'another one 2', 'that one 3', 'the one 1'}) + + feed(':sort ni u /on') + screen:expect([[ + another {inc:on}e 2 | + that {hl:on}e 3 | + the {hl:on}e 1 | + :sort ni u /on^ | + ]]) + feed('<esc>') + end) + + it('incsearch works with :vimgrep family', function() + -- oldtest: Test_incsearch_vimgrep_dump(). + screen:try_resize(30, 4) + command('set incsearch hlsearch scrolloff=0') + funcs.setline(1, {'another one 2', 'that one 3', 'the one 1'}) + + feed(':vimgrep on') + screen:expect([[ + another {inc:on}e 2 | + that {hl:on}e 3 | + the {hl:on}e 1 | + :vimgrep on^ | + ]]) + feed('<esc>') + + feed(':vimg /on/ *.txt') + screen:expect([[ + another {inc:on}e 2 | + that {hl:on}e 3 | + the {hl:on}e 1 | + :vimg /on/ *.txt^ | + ]]) + feed('<esc>') + + feed(':vimgrepadd "\\<LT>on') + screen:expect([[ + another {inc:on}e 2 | + that {hl:on}e 3 | + the {hl:on}e 1 | + :vimgrepadd "\<on^ | + ]]) + feed('<esc>') + + feed(':lv "tha') + screen:expect([[ + another one 2 | + {inc:tha}t one 3 | + the one 1 | + :lv "tha^ | + ]]) + feed('<esc>') + + feed(':lvimgrepa "the" **/*.txt') + screen:expect([[ + ano{inc:the}r one 2 | + that one 3 | + {hl:the} one 1 | + :lvimgrepa "the" **/*.txt^ | + ]]) + feed('<esc>') + end) end) diff --git a/test/functional/ui/cursor_spec.lua b/test/functional/ui/cursor_spec.lua index 6c913124ac..e1a72ced05 100644 --- a/test/functional/ui/cursor_spec.lua +++ b/test/functional/ui/cursor_spec.lua @@ -286,6 +286,21 @@ describe('ui/cursor', function() eq(173, named.normal.blinkon) eq(42, named.showmatch.cell_percentage) end) + + -- If there is no setting for guicursor, it becomes the default setting. + meths.set_option('guicursor', 'n:ver35-blinkwait171-blinkoff172-blinkon173-Cursor/lCursor') + screen:expect(function() + for _,m in ipairs(screen._mode_info) do + if m.name ~= 'normal' then + eq('block', m.cursor_shape or 'block') + eq(0, m.blinkon or 0) + eq(0, m.blinkoff or 0) + eq(0, m.blinkwait or 0) + eq(0, m.hl_id or 0) + eq(0, m.id_lm or 0) + end + end + end) end) it("empty 'guicursor' sets cursor_shape=block in all modes", function() @@ -297,6 +312,8 @@ describe('ui/cursor', function() if m['cursor_shape'] ~= nil then eq('block', m.cursor_shape) eq(0, m.blinkon) + eq(0, m.hl_id) + eq(0, m.id_lm) end end end) diff --git a/test/functional/ui/inccommand_spec.lua b/test/functional/ui/inccommand_spec.lua index afb0c9cfa6..74e85212c8 100644 --- a/test/functional/ui/inccommand_spec.lua +++ b/test/functional/ui/inccommand_spec.lua @@ -162,7 +162,7 @@ describe(":substitute, 'inccommand' preserves", function() insert(default_text) feed_command("set inccommand=" .. case) - local delims = { '/', '#', ';', '%', ',', '@', '!', ''} + local delims = { '/', '#', ';', '%', ',', '@', '!' } for _,delim in pairs(delims) do feed_command("%s"..delim.."lines"..delim.."LINES"..delim.."g") expect([[ |