Update test

This commit is contained in:
Jit Yao Yap 2019-03-22 01:12:20 +08:00 committed by Björn Linse
parent 31fa064c68
commit 2a618e0ad0

View File

@ -1109,7 +1109,6 @@ describe('floating windows', function()
end) end)
it('does not crash with inccommand #9379', function() it('does not crash with inccommand #9379', function()
screen:try_resize(30,15)
local expected_pos = { local expected_pos = {
[3]={{id=1001}, 'NW', 1, 2, 0, true}, [3]={{id=1001}, 'NW', 1, 2, 0, true},
} }
@ -1121,42 +1120,26 @@ describe('floating windows', function()
meths.open_win(buf, true, {relative='editor', width=30, height=3, row=2, col=0}) meths.open_win(buf, true, {relative='editor', width=30, height=3, row=2, col=0})
insert([[ insert([[
foo foo
bar bar
]]) ]])
if multigrid then if multigrid then
screen:expect{grid=[[ screen:expect{grid=[[
## grid 1 ## grid 1
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| {5:[No Name] }|
[2:------------------------------]| |
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
{5:[No Name] }|
|
## grid 2 ## grid 2
| |
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
## grid 3 ## grid 3
{1:foo }| {1:foo }|
{1:bar }| {1:bar }|
@ -1164,21 +1147,13 @@ describe('floating windows', function()
]], float_pos=expected_pos} ]], float_pos=expected_pos}
else else
screen:expect([[ screen:expect([[
| |
{0:~ }| {0:~ }|
{1:foo }| {1:foo }{0: }|
{1:bar }| {1:bar }{0: }|
{1:^ }| {1:^ }{0: }|
{0:~ }| {5:[No Name] }|
{0:~ }| |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{5:[No Name] }|
|
]]) ]])
end end
@ -1187,27 +1162,15 @@ describe('floating windows', function()
if multigrid then if multigrid then
screen:expect{grid=[[ screen:expect{grid=[[
## grid 1 ## grid 1
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| {5:[Preview] }|
[2:------------------------------]| :%s/.^ |
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
{5:[Preview] }|
:%s/.^ |
## grid 2 ## grid 2
| |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
## grid 3 ## grid 3
{17:f}{1:oo }| {17:f}{1:oo }|
{17:b}{1:ar }| {17:b}{1:ar }|
@ -1215,21 +1178,13 @@ describe('floating windows', function()
]], float_pos=expected_pos} ]], float_pos=expected_pos}
else else
screen:expect([[ screen:expect([[
| |
{0:~ }| {5:[No Name] }|
{17:f}{1:oo }| {17:f}{1:oo } |
{17:b}{1:ar }| {17:b}{1:ar } |
{1: }| {1: }{0: }|
{5:[No Name] }| {5:[Preview] }|
|1| {17:f}oo | :%s/.^ |
|2| {17:b}ar |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{5:[Preview] }|
:%s/.^ |
]]) ]])
end end
@ -1238,35 +1193,19 @@ describe('floating windows', function()
if multigrid then if multigrid then
screen:expect{grid=[[ screen:expect{grid=[[
## grid 1 ## grid 1
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| [2:----------------------------------------]|
[2:------------------------------]| {5:[No Name] }|
[2:------------------------------]| |
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
[2:------------------------------]|
{5:[No Name] }|
|
## grid 2 ## grid 2
| |
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }| {0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
## grid 3 ## grid 3
{1:foo }| {1:foo }|
{1:bar }| {1:bar }|
@ -1274,21 +1213,13 @@ describe('floating windows', function()
]], float_pos=expected_pos} ]], float_pos=expected_pos}
else else
screen:expect([[ screen:expect([[
| |
{0:~ }| {0:~ }|
{1:foo }| {1:foo }{0: }|
{1:bar }| {1:bar }{0: }|
{1:^ }| {1:^ }{0: }|
{0:~ }| {5:[No Name] }|
{0:~ }| |
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{0:~ }|
{5:[No Name] }|
|
]]) ]])
end end
end) end)