mirror of
https://github.com/neovim/neovim.git
synced 2025-11-04 17:54:30 +00:00
tests/ui: Also test character at cursor
This commit is contained in:
committed by
Thiago de Arruda
parent
638452da2a
commit
a7aeda8c7a
@@ -43,7 +43,7 @@ describe('107', function()
|
||||
start: |
|
||||
[1, '1 '] |
|
||||
[50, '50 '] |
|
||||
^59, '59 '] |
|
||||
^[59, '59 '] |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
|
||||
@@ -93,7 +93,7 @@ describe('system()', function()
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
^call system("yes") |
|
||||
^:call system("yes") |
|
||||
]])
|
||||
feed('<c-c>')
|
||||
screen:expect([[
|
||||
@@ -259,7 +259,7 @@ describe('systemlist()', function()
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
^call systemlist("yes | xargs") |
|
||||
^:call systemlist("yes | xargs") |
|
||||
]])
|
||||
feed('<c-c>')
|
||||
screen:expect([[
|
||||
|
||||
@@ -28,7 +28,7 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
testing |
|
||||
mouse |
|
||||
support and selectio^ |
|
||||
support and selectio^n |
|
||||
~ |
|
||||
|
|
||||
]])
|
||||
@@ -42,14 +42,14 @@ describe('Mouse input', function()
|
||||
feed('<LeftMouse><2,1>')
|
||||
screen:expect([[
|
||||
testing |
|
||||
mo^se |
|
||||
mo^use |
|
||||
support and selection |
|
||||
~ |
|
||||
|
|
||||
]])
|
||||
feed('<LeftMouse><0,0>')
|
||||
screen:expect([[
|
||||
^esting |
|
||||
^testing |
|
||||
mouse |
|
||||
support and selection |
|
||||
~ |
|
||||
@@ -62,7 +62,7 @@ describe('Mouse input', function()
|
||||
feed('<LeftMouse><2,1>')
|
||||
screen:expect([[
|
||||
testing |
|
||||
mo^se |
|
||||
mo^use |
|
||||
support and selection |
|
||||
~ |
|
||||
|
|
||||
@@ -70,7 +70,7 @@ describe('Mouse input', function()
|
||||
feed('<LeftDrag><4,1>')
|
||||
screen:expect([[
|
||||
testing |
|
||||
mo{1:us}^ |
|
||||
mo{1:us}^e |
|
||||
support and selection |
|
||||
~ |
|
||||
{2:-- VISUAL --} |
|
||||
@@ -79,13 +79,13 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
testing |
|
||||
mo{1:use } |
|
||||
{1:su}^port and selection |
|
||||
{1:su}^pport and selection |
|
||||
~ |
|
||||
{2:-- VISUAL --} |
|
||||
]])
|
||||
feed('<LeftDrag><0,0>')
|
||||
screen:expect([[
|
||||
^{1:esting } |
|
||||
^t{1:esting } |
|
||||
{1:mou}se |
|
||||
support and selection |
|
||||
~ |
|
||||
@@ -98,7 +98,7 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
testing |
|
||||
mouse |
|
||||
{1:suppor}^ and selection |
|
||||
{1:suppor}^t and selection |
|
||||
~ |
|
||||
{2:-- VISUAL --} |
|
||||
]])
|
||||
@@ -109,7 +109,7 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
testing |
|
||||
mouse |
|
||||
{1:su}^{1:port and selection } |
|
||||
{1:su}^p{1:port and selection } |
|
||||
~ |
|
||||
{2:-- VISUAL LINE --} |
|
||||
]])
|
||||
@@ -120,7 +120,7 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
testing |
|
||||
mouse |
|
||||
su^port and selection |
|
||||
su^pport and selection |
|
||||
~ |
|
||||
{2:-- VISUAL BLOCK --} |
|
||||
]])
|
||||
@@ -129,7 +129,7 @@ describe('Mouse input', function()
|
||||
it('right click extends visual selection to the clicked location', function()
|
||||
feed('<LeftMouse><0,0>')
|
||||
screen:expect([[
|
||||
^esting |
|
||||
^testing |
|
||||
mouse |
|
||||
support and selection |
|
||||
~ |
|
||||
@@ -139,7 +139,7 @@ describe('Mouse input', function()
|
||||
screen:expect([[
|
||||
{1:testing } |
|
||||
{1:mouse } |
|
||||
{1:su}^port and selection |
|
||||
{1:su}^pport and selection |
|
||||
~ |
|
||||
{2:-- VISUAL --} |
|
||||
]])
|
||||
|
||||
@@ -418,9 +418,8 @@ function Screen:_row_repr(row, attr_ids, attr_ignore)
|
||||
end
|
||||
if self._rows[self._cursor.row] == row and self._cursor.col == i then
|
||||
table.insert(rv, '^')
|
||||
else
|
||||
table.insert(rv, row[i].text)
|
||||
end
|
||||
table.insert(rv, row[i].text)
|
||||
end
|
||||
if current_attr_id then
|
||||
table.insert(rv, '}')
|
||||
|
||||
@@ -143,7 +143,7 @@ describe('Screen', function()
|
||||
]])
|
||||
insert('hello')
|
||||
screen:expect([[
|
||||
hell^ |hello |hello |
|
||||
hell^o |hello |hello |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
@@ -169,7 +169,7 @@ describe('Screen', function()
|
||||
execute('sp', 'vsp', 'vsp')
|
||||
insert('hello')
|
||||
screen:expect([[
|
||||
hell^ |hello |hello |
|
||||
hell^o |hello |hello |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
@@ -189,7 +189,7 @@ describe('Screen', function()
|
||||
feed('h')
|
||||
screen:expect([[
|
||||
4+ [No Name] + [No Name] X|
|
||||
hell^2 |
|
||||
hell^o2 |
|
||||
~ |
|
||||
~ |
|
||||
~ |
|
||||
@@ -206,7 +206,7 @@ describe('Screen', function()
|
||||
execute('tabprevious')
|
||||
screen:expect([[
|
||||
4+ [No Name] + [No Name] X|
|
||||
hell^ |hello |hello |
|
||||
hell^o |hello |hello |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
~ |~ |~ |
|
||||
@@ -327,7 +327,7 @@ describe('Screen', function()
|
||||
it('only affects the current scroll region', function()
|
||||
feed('6k')
|
||||
screen:expect([[
|
||||
^crolling |and |and |
|
||||
^scrolling |and |and |
|
||||
and |clearing |clearing |
|
||||
clearing |in |in |
|
||||
in |split |split |
|
||||
@@ -361,7 +361,7 @@ describe('Screen', function()
|
||||
]])
|
||||
feed('gg')
|
||||
screen:expect([[
|
||||
scrolling |^nserting |and |
|
||||
scrolling |^Inserting |and |
|
||||
and |text |clearing |
|
||||
clearing |with |in |
|
||||
in |many |split |
|
||||
@@ -383,7 +383,7 @@ describe('Screen', function()
|
||||
clearing |lines |in |
|
||||
in |to |split |
|
||||
split |test |windows |
|
||||
windows |^crolling | |
|
||||
windows |^scrolling | |
|
||||
[No Name] [+] [No Name] [+] <Name] [+] |
|
||||
clearing |
|
||||
in |
|
||||
@@ -400,7 +400,7 @@ describe('Screen', function()
|
||||
clearing |test |in |
|
||||
in |scrolling |split |
|
||||
split |and |windows |
|
||||
windows |^learing | |
|
||||
windows |^clearing | |
|
||||
[No Name] [+] [No Name] [+] <Name] [+] |
|
||||
clearing |
|
||||
in |
|
||||
@@ -412,7 +412,7 @@ describe('Screen', function()
|
||||
]])
|
||||
feed('5k')
|
||||
screen:expect([[
|
||||
scrolling |^ines |and |
|
||||
scrolling |^lines |and |
|
||||
and |to |clearing |
|
||||
clearing |test |in |
|
||||
in |scrolling |split |
|
||||
@@ -429,7 +429,7 @@ describe('Screen', function()
|
||||
]])
|
||||
feed('k')
|
||||
screen:expect([[
|
||||
scrolling |^any |and |
|
||||
scrolling |^many |and |
|
||||
and |lines |clearing |
|
||||
clearing |to |in |
|
||||
in |test |split |
|
||||
@@ -466,7 +466,7 @@ describe('Screen', function()
|
||||
it('has minimum width/height values', function()
|
||||
screen:try_resize(1, 1)
|
||||
screen:expect([[
|
||||
-- INS^RT --|
|
||||
-- INS^ERT --|
|
||||
|
|
||||
]])
|
||||
feed('<esc>:ls')
|
||||
|
||||
Reference in New Issue
Block a user