mirror of
https://github.com/neovim/neovim.git
synced 2025-11-03 17:24:29 +00:00
test: fix screen assertions
This commit is contained in:
@@ -734,11 +734,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
feed_command("set nomodified")
|
feed_command("set nomodified")
|
||||||
feed(":%s/tw")
|
feed(":%s/tw")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
{12:tw}o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
{12:tw}o lines |
|
{12:tw}o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] }|
|
{11:[No Name] }|
|
||||||
|2| {12:tw}o lines |
|
|2| {12:tw}o lines |
|
||||||
|4| {12:tw}o lines |
|
|4| {12:tw}o lines |
|
||||||
@@ -791,11 +791,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
it('shows split window when typing the pattern', function()
|
it('shows split window when typing the pattern', function()
|
||||||
feed(":%s/tw")
|
feed(":%s/tw")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
{12:tw}o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
{12:tw}o lines |
|
{12:tw}o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| {12:tw}o lines |
|
|2| {12:tw}o lines |
|
||||||
|4| {12:tw}o lines |
|
|4| {12:tw}o lines |
|
||||||
@@ -812,11 +812,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
it('shows preview with empty replacement', function()
|
it('shows preview with empty replacement', function()
|
||||||
feed(":%s/tw/")
|
feed(":%s/tw/")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
o lines |
|
o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| o lines |
|
|2| o lines |
|
||||||
|4| o lines |
|
|4| o lines |
|
||||||
@@ -831,11 +831,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
|
|
||||||
feed("x")
|
feed("x")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
{12:x}o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
{12:x}o lines |
|
{12:x}o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| {12:x}o lines |
|
|2| {12:x}o lines |
|
||||||
|4| {12:x}o lines |
|
|4| {12:x}o lines |
|
||||||
@@ -850,11 +850,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
|
|
||||||
feed("<bs>")
|
feed("<bs>")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
o lines |
|
o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| o lines |
|
|2| o lines |
|
||||||
|4| o lines |
|
|4| o lines |
|
||||||
@@ -872,11 +872,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
it('shows split window when typing replacement', function()
|
it('shows split window when typing replacement', function()
|
||||||
feed(":%s/tw/XX")
|
feed(":%s/tw/XX")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
|
{12:XX}o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
{12:XX}o lines |
|
{12:XX}o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| {12:XX}o lines |
|
|2| {12:XX}o lines |
|
||||||
|4| {12:XX}o lines |
|
|4| {12:XX}o lines |
|
||||||
@@ -938,11 +938,11 @@ describe(":substitute, inccommand=split", function()
|
|||||||
feed(":%s/tw")
|
feed(":%s/tw")
|
||||||
-- 'cursorline' is NOT active during preview.
|
-- 'cursorline' is NOT active during preview.
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
Inc substitution on |
|
||||||
{12:tw}o lines |
|
{12:tw}o lines |
|
||||||
Inc substitution on |
|
Inc substitution on |
|
||||||
{12:tw}o lines |
|
{12:tw}o lines |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| {12:tw}o lines |
|
|2| {12:tw}o lines |
|
||||||
|4| {12:tw}o lines |
|
|4| {12:tw}o lines |
|
||||||
@@ -2205,11 +2205,11 @@ describe(":substitute", function()
|
|||||||
|
|
||||||
feed("/KKK")
|
feed("/KKK")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
T T123 T T123 T2T TT T23423424|
|
||||||
|
x |
|
||||||
afa {12:KKK}adf la;lkd {12:KKK}alx |
|
afa {12:KKK}adf la;lkd {12:KKK}alx |
|
||||||
|
|
|
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|3| afa {12:KKK}adf la;lkd {12:KKK}alx |
|
|3| afa {12:KKK}adf la;lkd {12:KKK}alx |
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
@@ -2485,11 +2485,11 @@ describe(":substitute", function()
|
|||||||
wait()
|
wait()
|
||||||
feed([[:%s/\(some\)\@<lt>!thing/one/]])
|
feed([[:%s/\(some\)\@<lt>!thing/one/]])
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
something |
|
||||||
every{12:one} |
|
every{12:one} |
|
||||||
someone |
|
someone |
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|2| every{12:one} |
|
|2| every{12:one} |
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
@@ -2527,11 +2527,11 @@ describe(":substitute", function()
|
|||||||
wait()
|
wait()
|
||||||
feed([[:%s/some\(thing\)\@!/every/]])
|
feed([[:%s/some\(thing\)\@!/every/]])
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
something |
|
||||||
|
everything |
|
||||||
{12:every}one |
|
{12:every}one |
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
{15:~ }|
|
|
||||||
{15:~ }|
|
|
||||||
{11:[No Name] [+] }|
|
{11:[No Name] [+] }|
|
||||||
|3| {12:every}one |
|
|3| {12:every}one |
|
||||||
{15:~ }|
|
{15:~ }|
|
||||||
|
|||||||
@@ -419,9 +419,9 @@ describe('ui/mouse/input', function()
|
|||||||
meths.set_option('showtabline', 2)
|
meths.set_option('showtabline', 2)
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{fill:test-test2 }|
|
{fill:test-test2 }|
|
||||||
|
testing |
|
||||||
mouse |
|
mouse |
|
||||||
support and selectio^n |
|
support and selectio^n |
|
||||||
{0:~ }|
|
|
||||||
|
|
|
|
||||||
]])
|
]])
|
||||||
meths.set_var('reply', {})
|
meths.set_var('reply', {})
|
||||||
@@ -539,9 +539,9 @@ describe('ui/mouse/input', function()
|
|||||||
feed_command('tabprevious') -- go to first tab
|
feed_command('tabprevious') -- go to first tab
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
{sel: + foo }{tab: + bar }{fill: }{tab:X}|
|
{sel: + foo }{tab: + bar }{fill: }{tab:X}|
|
||||||
|
testing |
|
||||||
mouse |
|
mouse |
|
||||||
support and selectio^n |
|
support and selectio^n |
|
||||||
{0:~ }|
|
|
||||||
:tabprevious |
|
:tabprevious |
|
||||||
]])
|
]])
|
||||||
feed('<LeftMouse><10,0><LeftRelease>') -- go to second tab
|
feed('<LeftMouse><10,0><LeftRelease>') -- go to second tab
|
||||||
|
|||||||
@@ -1491,20 +1491,20 @@ describe('builtin popupmenu', function()
|
|||||||
|
|
||||||
command("split")
|
command("split")
|
||||||
screen:expect([[
|
screen:expect([[
|
||||||
|
xx |
|
||||||
choice^ |
|
choice^ |
|
||||||
{1:~ }|
|
|
||||||
{n:word }{1: }|
|
{n:word }{1: }|
|
||||||
{s:choice }{4: }|
|
{s:choice }{4: }|
|
||||||
{n:text } |
|
{n:text } |
|
||||||
{n:thing }{1: }|
|
{n:thing } |
|
||||||
{3:[No Name] [+] }|
|
{3:[No Name] [+] }|
|
||||||
{2:-- INSERT --} |
|
{2:-- INSERT --} |
|
||||||
]])
|
]])
|
||||||
|
|
||||||
meths.input_mouse('wheel', 'down', '', 0, 6, 15)
|
meths.input_mouse('wheel', 'down', '', 0, 6, 15)
|
||||||
screen:expect{grid=[[
|
screen:expect{grid=[[
|
||||||
|
xx |
|
||||||
choice^ |
|
choice^ |
|
||||||
{1:~ }|
|
|
||||||
{n:word }{1: }|
|
{n:word }{1: }|
|
||||||
{s:choice }{4: }|
|
{s:choice }{4: }|
|
||||||
{n:text } |
|
{n:text } |
|
||||||
|
|||||||
Reference in New Issue
Block a user