mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(tests): remove irrelevant usage of display-=msgsep
These were just added to avoid churn when changing the default of 'display'. To simplify message handling logic, we might want to remove support for printing messages in default_grid later on. This would allow things like printing error messages safely in the middle of redraw, or a future graduation of the 'multigrid' feature.
This commit is contained in:
@@ -144,13 +144,14 @@ describe('debug.debug', function()
|
||||
before_each(function()
|
||||
screen = Screen.new()
|
||||
screen:attach()
|
||||
screen:set_default_attr_ids({
|
||||
[0] = {bold=true, foreground=255},
|
||||
E = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
|
||||
cr = {bold = true, foreground = Screen.colors.SeaGreen4},
|
||||
})
|
||||
command("set display-=msgsep")
|
||||
screen:set_default_attr_ids {
|
||||
[0] = {bold=true, foreground=255};
|
||||
[1] = {bold = true, reverse = true};
|
||||
E = {foreground = Screen.colors.Grey100, background = Screen.colors.Red};
|
||||
cr = {bold = true, foreground = Screen.colors.SeaGreen4};
|
||||
}
|
||||
end)
|
||||
|
||||
it('works', function()
|
||||
command([[lua
|
||||
function Test(a)
|
||||
@@ -160,9 +161,8 @@ describe('debug.debug', function()
|
||||
end
|
||||
]])
|
||||
feed(':lua Test()\n')
|
||||
screen:expect([[
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
@@ -173,11 +173,13 @@ describe('debug.debug', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
nil |
|
||||
lua_debug> ^ |
|
||||
]])
|
||||
]]}
|
||||
feed('print("TEST")\n')
|
||||
screen:expect([[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
@@ -186,8 +188,7 @@ describe('debug.debug', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
nil |
|
||||
lua_debug> print("TEST") |
|
||||
TEST |
|
||||
@@ -195,10 +196,10 @@ describe('debug.debug', function()
|
||||
]])
|
||||
feed('<C-c>')
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
nil |
|
||||
lua_debug> print("TEST") |
|
||||
TEST |
|
||||
@@ -212,6 +213,7 @@ describe('debug.debug', function()
|
||||
]]}
|
||||
feed('<C-l>:lua Test()\n')
|
||||
screen:expect([[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
@@ -222,19 +224,18 @@ describe('debug.debug', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
nil |
|
||||
lua_debug> ^ |
|
||||
]])
|
||||
feed('\n')
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
nil |
|
||||
lua_debug> |
|
||||
{E:E5108: Error executing lua [string ":lua"]:5: attempt}|
|
||||
@@ -268,6 +269,7 @@ describe('debug.debug', function()
|
||||
|
||||
feed("conttt<cr>") -- misspelled cont; invalid syntax
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
@@ -276,8 +278,7 @@ describe('debug.debug', function()
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
lua_debug> conttt |
|
||||
{E:E5115: Error while loading debug string: (debug comma}|
|
||||
{E:nd):1: '=' expected near '<eof>'} |
|
||||
@@ -286,14 +287,14 @@ describe('debug.debug', function()
|
||||
|
||||
feed("cont<cr>") -- exactly "cont", exit now
|
||||
screen:expect{grid=[[
|
||||
|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{0:~ }|
|
||||
{1: }|
|
||||
lua_debug> conttt |
|
||||
{E:E5115: Error while loading debug string: (debug comma}|
|
||||
{E:nd):1: '=' expected near '<eof>'} |
|
||||
|
||||
Reference in New Issue
Block a user