diff options
author | Björn Linse <bjorn.linse@gmail.com> | 2015-03-05 10:07:55 +0100 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-09 08:01:49 -0300 |
commit | a7aeda8c7a3b2c9854d40c1c9278fd67d94aaf3d (patch) | |
tree | c75bf741aa9ac092eb70739f53f36f94c0cb8dda | |
parent | 638452da2a5650dcee3eefa84f037d2920abbb76 (diff) | |
download | rneovim-a7aeda8c7a3b2c9854d40c1c9278fd67d94aaf3d.tar.gz rneovim-a7aeda8c7a3b2c9854d40c1c9278fd67d94aaf3d.tar.bz2 rneovim-a7aeda8c7a3b2c9854d40c1c9278fd67d94aaf3d.zip |
tests/ui: Also test character at cursor
-rw-r--r-- | test/functional/legacy/051_highlight_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/legacy/107_adjust_window_and_contents_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/shell/viml_system_spec.lua | 12 | ||||
-rw-r--r-- | test/functional/ui/highlight_spec.lua | 16 | ||||
-rw-r--r-- | test/functional/ui/mouse_spec.lua | 34 | ||||
-rw-r--r-- | test/functional/ui/screen.lua | 3 | ||||
-rw-r--r-- | test/functional/ui/screen_basic_spec.lua | 42 | ||||
-rw-r--r-- | test/functional/ui/sign_spec.lua | 2 | ||||
-rw-r--r-- | test/functional/ui/wildmode_spec.lua | 2 |
9 files changed, 57 insertions, 58 deletions
diff --git a/test/functional/legacy/051_highlight_spec.lua b/test/functional/legacy/051_highlight_spec.lua index 19eb4104cd..3d0375312d 100644 --- a/test/functional/legacy/051_highlight_spec.lua +++ b/test/functional/legacy/051_highlight_spec.lua @@ -28,7 +28,7 @@ describe(':highlight', function() gui=bold | guifg=Blue | Directory xxx ctermfg=4 | - -- More --^ | + -- More --^ | ]]) feed('q') wait() -- wait until we're back to normal diff --git a/test/functional/legacy/107_adjust_window_and_contents_spec.lua b/test/functional/legacy/107_adjust_window_and_contents_spec.lua index ffc2208d6e..f6ea7e5a6c 100644 --- a/test/functional/legacy/107_adjust_window_and_contents_spec.lua +++ b/test/functional/legacy/107_adjust_window_and_contents_spec.lua @@ -43,7 +43,7 @@ describe('107', function() start: | [1, '1 '] | [50, '50 '] | - ^59, '59 '] | + ^[59, '59 '] | ~ | ~ | ~ | diff --git a/test/functional/shell/viml_system_spec.lua b/test/functional/shell/viml_system_spec.lua index 75e9de6aa9..2742e23e00 100644 --- a/test/functional/shell/viml_system_spec.lua +++ b/test/functional/shell/viml_system_spec.lua @@ -60,7 +60,7 @@ describe('system()', function() it('`echo` and waits for its return', function() feed(':call system("echo")<cr>') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -93,11 +93,11 @@ describe('system()', function() ~ | ~ | ~ | - ^call system("yes") | + ^:call system("yes") | ]]) feed('<c-c>') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -226,7 +226,7 @@ describe('systemlist()', function() it('`echo` and waits for its return', function() feed(':call systemlist("echo")<cr>') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -259,11 +259,11 @@ describe('systemlist()', function() ~ | ~ | ~ | - ^call systemlist("yes | xargs") | + ^:call systemlist("yes | xargs") | ]]) feed('<c-c>') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | diff --git a/test/functional/ui/highlight_spec.lua b/test/functional/ui/highlight_spec.lua index 52ab3cb5bf..33a53ef201 100644 --- a/test/functional/ui/highlight_spec.lua +++ b/test/functional/ui/highlight_spec.lua @@ -54,7 +54,7 @@ describe('Default highlight groups', function() }) execute('sp', 'vsp', 'vsp') screen:expect([[ - ^ {2:|} {2:|} | + ^ {2:|} {2:|} | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | @@ -79,7 +79,7 @@ describe('Default highlight groups', function() ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | {2:[No Name] [No Name] [No Name] }| - ^ | + ^ | ~ | ~ | ~ | @@ -92,7 +92,7 @@ describe('Default highlight groups', function() -- (upstream vim has the same behavior) feed('<c-w>k<c-w>l') screen:expect([[ - {2:|}^ {2:|} | + {2:|}^ {2:|} | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | @@ -109,7 +109,7 @@ describe('Default highlight groups', function() ]]) feed('<c-w>l') screen:expect([[ - {2:|} {2:|}^ | + {2:|} {2:|}^ | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | @@ -126,7 +126,7 @@ describe('Default highlight groups', function() ]]) feed('<c-w>h<c-w>h') screen:expect([[ - ^ {2:|} {2:|} | + ^ {2:|} {2:|} | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | ~ {2:|}~ {2:|}~ | @@ -146,7 +146,7 @@ describe('Default highlight groups', function() it('insert mode text', function() feed('i') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -165,7 +165,7 @@ describe('Default highlight groups', function() it('end of file markers', function() screen:expect([[ - ^ | + ^ | {1:~ }| {1:~ }| {1:~ }| @@ -198,7 +198,7 @@ describe('Default highlight groups', function() ~ | :ls | 1 %a "[No Name]" line 1 | - {1:Press ENTER or type command to continue}^ | + {1:Press ENTER or type command to continue}^ | ]], {[1] = {bold = true, foreground = hlgroup_colors.Question}}) feed('<cr>') -- skip the "Press ENTER..." state or tests will hang end) diff --git a/test/functional/ui/mouse_spec.lua b/test/functional/ui/mouse_spec.lua index 296487fc9c..f1973f60ba 100644 --- a/test/functional/ui/mouse_spec.lua +++ b/test/functional/ui/mouse_spec.lua @@ -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 --} | ]]) @@ -153,7 +153,7 @@ describe('Mouse input', function() E426: tag not found: test| ing | Press ENTER or type comma| - nd to continue^ | + nd to continue^ | ]],nil,true) feed('<cr>') end) @@ -179,7 +179,7 @@ describe('Mouse input', function() to |to | test |test | mouse scrolling |mouse scrolling | - ^ | | + ^ | | ~ |~ | [No Name] [+] [No Name] [+] | to | @@ -193,7 +193,7 @@ describe('Mouse input', function() feed('<MouseUp><0,0>') screen:expect([[ mouse scrolling |lines | - ^ |to | + ^ |to | ~ |test | ~ |mouse scrolling | ~ | | @@ -210,7 +210,7 @@ describe('Mouse input', function() feed('<MouseDown><27,0>') screen:expect([[ mouse scrolling |text | - ^ |with | + ^ |with | ~ |many | ~ |lines | ~ |to | @@ -227,7 +227,7 @@ describe('Mouse input', function() feed('<MouseDown><27,7><MouseDown>') screen:expect([[ mouse scrolling |text | - ^ |with | + ^ |with | ~ |many | ~ |lines | ~ |to | diff --git a/test/functional/ui/screen.lua b/test/functional/ui/screen.lua index 71703cc112..585037466e 100644 --- a/test/functional/ui/screen.lua +++ b/test/functional/ui/screen.lua @@ -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, '}') diff --git a/test/functional/ui/screen_basic_spec.lua b/test/functional/ui/screen_basic_spec.lua index 06edf44a7c..366a0af453 100644 --- a/test/functional/ui/screen_basic_spec.lua +++ b/test/functional/ui/screen_basic_spec.lua @@ -85,7 +85,7 @@ describe('Screen', function() it('horizontal', function() execute('sp') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -106,7 +106,7 @@ describe('Screen', function() execute('sp') execute('resize 8') screen:expect([[ - ^ | + ^ | ~ | ~ | ~ | @@ -126,7 +126,7 @@ describe('Screen', function() it('horizontal and vertical', function() execute('sp', 'vsp', 'vsp') screen:expect([[ - ^ | | | + ^ | | | ~ |~ |~ | ~ |~ |~ | ~ |~ |~ | @@ -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 | ~ |~ |~ | ~ |~ |~ | ~ |~ |~ | @@ -229,7 +229,7 @@ describe('Screen', function() screen:expect([[ line 1 | line 2 | - ^ | + ^ | ~ | ~ | ~ | @@ -262,7 +262,7 @@ describe('Screen', function() ~ | ~ | ~ | - :ls^ | + :ls^ | ]]) end) @@ -282,7 +282,7 @@ describe('Screen', function() ~ | :ls | 1 %a "[No Name]" line 1 | - Press ENTER or type command to continue^ | + Press ENTER or type command to continue^ | ]]) feed('<cr>') -- skip the "Press ENTER..." state or tests will hang end) @@ -312,7 +312,7 @@ describe('Screen', function() in |in |in | split |split |split | windows |windows |windows | - ^ | | | + ^ | | | [No Name] [+] [No Name] [+] [No Name] [+] | clearing | in | @@ -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 | @@ -349,7 +349,7 @@ describe('Screen', function() clearing |in |in | in |split |split | split |windows |windows | - windows |^ | | + windows |^ | | [No Name] [+] [No Name] [+] <Name] [+] | clearing | in | @@ -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 | @@ -455,7 +455,7 @@ describe('Screen', function() it('rebuilds the whole screen', function() screen:expect([[ - resize^ | + resize^ | ~ | ~ | ~ | @@ -466,13 +466,13 @@ describe('Screen', function() it('has minimum width/height values', function() screen:try_resize(1, 1) screen:expect([[ - -- INS^RT --| + -- INS^ERT --| | ]]) feed('<esc>:ls') screen:expect([[ resize | - :ls^ | + :ls^ | ]]) end) end) diff --git a/test/functional/ui/sign_spec.lua b/test/functional/ui/sign_spec.lua index a7a4172440..c32a7b9381 100644 --- a/test/functional/ui/sign_spec.lua +++ b/test/functional/ui/sign_spec.lua @@ -28,7 +28,7 @@ describe('Signs', function() >!a | b | >>c | - ^ | + ^ | ~ | ~ | ~ | diff --git a/test/functional/ui/wildmode_spec.lua b/test/functional/ui/wildmode_spec.lua index ee2f8b15f8..dd2bc84cfa 100644 --- a/test/functional/ui/wildmode_spec.lua +++ b/test/functional/ui/wildmode_spec.lua @@ -25,7 +25,7 @@ describe("'wildmode'", function() ~ | ~ | define jump list > | - :sign define^ | + :sign define^ | ]]) end) end) |