From 068a998e609b2568ad280e1753beb2a1251354a5 Mon Sep 17 00:00:00 2001 From: bfredl Date: Wed, 17 Aug 2022 16:19:35 +0200 Subject: 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. --- test/functional/ui/output_spec.lua | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'test/functional/ui/output_spec.lua') diff --git a/test/functional/ui/output_spec.lua b/test/functional/ui/output_spec.lua index 71c6410013..9bb067ed8e 100644 --- a/test/functional/ui/output_spec.lua +++ b/test/functional/ui/output_spec.lua @@ -100,45 +100,52 @@ describe("shell command :!", function() pending('missing printf') end local screen = Screen.new(50, 4) + screen:set_default_attr_ids { + [1] = {bold = true, reverse = true}; + [2] = {bold = true, foreground = Screen.colors.SeaGreen}; + [3] = {foreground = Screen.colors.Blue}; + } screen:attach() - command("set display-=msgsep") -- Print TAB chars. #2958 feed([[:!printf '1\t2\t3']]) - screen:expect([[ - ~ | + screen:expect{grid=[[ + {1: }| :!printf '1\t2\t3' | 1 2 3 | - Press ENTER or type command to continue^ | - ]]) + {2:Press ENTER or type command to continue}^ | + ]]} feed([[]]) + -- Print BELL control code. #4338 screen.bell = false feed([[:!printf '\007\007\007\007text']]) screen:expect{grid=[[ - ~ | + {1: }| :!printf '\007\007\007\007text' | text | - Press ENTER or type command to continue^ | + {2:Press ENTER or type command to continue}^ | ]], condition=function() eq(true, screen.bell) end} feed([[]]) + -- Print BS control code. feed([[:echo system('printf ''\010\n''')]]) screen:expect([[ - ~ | - ^H | + {1: }| + {3:^H} | | - Press ENTER or type command to continue^ | + {2:Press ENTER or type command to continue}^ | ]]) feed([[]]) + -- Print LF control code. feed([[:!printf '\n']]) screen:expect([[ :!printf '\n' | | | - Press ENTER or type command to continue^ | + {2:Press ENTER or type command to continue}^ | ]]) feed([[]]) end) -- cgit