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:
bfredl
2022-08-17 16:19:35 +02:00
parent 35653e6bcd
commit 068a998e60
9 changed files with 152 additions and 158 deletions

View File

@@ -321,13 +321,14 @@ describe('input non-printable chars', function()
it("doesn't crash when echoing them back", function()
write_file("Xtest-overwrite", [[foobar]])
local screen = Screen.new(60,8)
screen:set_default_attr_ids({
[1] = {bold = true, foreground = Screen.colors.Blue1},
[2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red},
[3] = {bold = true, foreground = Screen.colors.SeaGreen4}
})
screen:set_default_attr_ids {
[1] = {bold = true, foreground = Screen.colors.Blue1};
[2] = {foreground = Screen.colors.Grey100, background = Screen.colors.Red};
[3] = {bold = true, foreground = Screen.colors.SeaGreen4};
[4] = {bold = true, reverse = true};
}
screen:attach()
command("set display-=msgsep shortmess-=F")
command("set shortmess-=F")
feed_command("e Xtest-overwrite")
screen:expect([[
@@ -346,11 +347,11 @@ describe('input non-printable chars', function()
write_file("Xtest-overwrite", [[smurf]])
feed_command("w")
screen:expect([[
foobar |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
{3:Do you really want to write to it (y/n)?}^ |
@@ -358,10 +359,10 @@ describe('input non-printable chars', function()
feed("u")
screen:expect([[
foobar |
{1:~ }|
{1:~ }|
{1:~ }|
{1:~ }|
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
{3:Do you really want to write to it (y/n)?}u |
@@ -370,9 +371,9 @@ describe('input non-printable chars', function()
feed("\005")
screen:expect([[
foobar |
{1:~ }|
{1:~ }|
{1:~ }|
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
{3:Do you really want to write to it (y/n)?}u |
@@ -382,8 +383,8 @@ describe('input non-printable chars', function()
feed("n")
screen:expect([[
{1:~ }|
{1:~ }|
foobar |
{4: }|
"Xtest-overwrite" |
{2:WARNING: The file has been changed since reading it!!!} |
{3:Do you really want to write to it (y/n)?}u |