aboutsummaryrefslogtreecommitdiff
path: root/test/functional/ui/input_spec.lua
diff options
context:
space:
mode:
authorbfredl <bjorn.linse@gmail.com>2024-03-26 21:23:36 +0100
committerbfredl <bjorn.linse@gmail.com>2024-03-26 21:28:05 +0100
commit35f2bb05a5cb84af405a094f040b92461a824e61 (patch)
tree157ba34b5e8673092405b9b3dfd70bcba180590e /test/functional/ui/input_spec.lua
parent0c0be09eab66975e62c67522620fee10f82663d2 (diff)
downloadrneovim-35f2bb05a5cb84af405a094f040b92461a824e61.tar.gz
rneovim-35f2bb05a5cb84af405a094f040b92461a824e61.tar.bz2
rneovim-35f2bb05a5cb84af405a094f040b92461a824e61.zip
refactor(tests): use new global defaults instead of set_default_attr_ids
This will be done in batches.
Diffstat (limited to 'test/functional/ui/input_spec.lua')
-rw-r--r--test/functional/ui/input_spec.lua59
1 files changed, 22 insertions, 37 deletions
diff --git a/test/functional/ui/input_spec.lua b/test/functional/ui/input_spec.lua
index b2899bf82d..348be7af6a 100644
--- a/test/functional/ui/input_spec.lua
+++ b/test/functional/ui/input_spec.lua
@@ -280,21 +280,16 @@ end)
it('typing a simplifiable key at hit-enter prompt triggers mapping vim-patch:8.2.0839', function()
local screen = Screen.new(60, 8)
- screen:set_default_attr_ids({
- [1] = { bold = true, foreground = Screen.colors.Blue }, -- NonText
- [2] = { bold = true, reverse = true }, -- MsgSeparator
- [3] = { bold = true, foreground = Screen.colors.SeaGreen }, -- MoreMsg
- })
screen:attach()
command([[nnoremap <C-6> <Cmd>echo 'hit ctrl-6'<CR>]])
feed_command('ls')
screen:expect([[
|
{1:~ }|*3
- {2: }|
+ {3: }|
:ls |
1 %a "[No Name]" line 1 |
- {3:Press ENTER or type command to continue}^ |
+ {6:Press ENTER or type command to continue}^ |
]])
feed('<C-6>')
screen:expect([[
@@ -331,12 +326,6 @@ 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 },
- [4] = { bold = true, reverse = true },
- }
screen:attach()
command('set shortmess-=F')
@@ -354,45 +343,45 @@ describe('input non-printable chars', function()
screen:expect([[
foobar |
{1:~ }|*3
- {4: }|
+ {3: }|
"Xtest-overwrite" |
- {2:WARNING: The file has been changed since reading it!!!} |
- {3:Do you really want to write to it (y/n)?}^ |
+ {9:WARNING: The file has been changed since reading it!!!} |
+ {6:Do you really want to write to it (y/n)?}^ |
]])
feed('u')
screen:expect([[
foobar |
{1:~ }|*2
- {4: }|
+ {3: }|
"Xtest-overwrite" |
- {2:WARNING: The file has been changed since reading it!!!} |
- {3:Do you really want to write to it (y/n)?}u |
- {3:Do you really want to write to it (y/n)?}^ |
+ {9:WARNING: The file has been changed since reading it!!!} |
+ {6:Do you really want to write to it (y/n)?}u |
+ {6:Do you really want to write to it (y/n)?}^ |
]])
feed('\005')
screen:expect([[
foobar |
{1:~ }|
- {4: }|
+ {3: }|
"Xtest-overwrite" |
- {2:WARNING: The file has been changed since reading it!!!} |
- {3:Do you really want to write to it (y/n)?}u |
- {3:Do you really want to write to it (y/n)?} |
- {3:Do you really want to write to it (y/n)?}^ |
+ {9:WARNING: The file has been changed since reading it!!!} |
+ {6:Do you really want to write to it (y/n)?}u |
+ {6:Do you really want to write to it (y/n)?} |
+ {6:Do you really want to write to it (y/n)?}^ |
]])
feed('n')
screen:expect([[
foobar |
- {4: }|
+ {3: }|
"Xtest-overwrite" |
- {2:WARNING: The file has been changed since reading it!!!} |
- {3:Do you really want to write to it (y/n)?}u |
- {3:Do you really want to write to it (y/n)?} |
- {3:Do you really want to write to it (y/n)?}n |
- {3:Press ENTER or type command to continue}^ |
+ {9:WARNING: The file has been changed since reading it!!!} |
+ {6:Do you really want to write to it (y/n)?}u |
+ {6:Do you really want to write to it (y/n)?} |
+ {6:Do you really want to write to it (y/n)?}n |
+ {6:Press ENTER or type command to continue}^ |
]])
feed('<cr>')
@@ -437,10 +426,6 @@ describe('display is updated', function()
local screen
before_each(function()
screen = Screen.new(60, 8)
- screen:set_default_attr_ids({
- [1] = { bold = true, foreground = Screen.colors.Blue1 }, -- NonText
- [2] = { bold = true }, -- ModeMsg
- })
screen:attach()
end)
@@ -452,7 +437,7 @@ describe('display is updated', function()
abc |
^ |
{1:~ }|*5
- {2:-- INSERT --} |
+ {5:-- INSERT --} |
]])
end)
@@ -464,7 +449,7 @@ describe('display is updated', function()
abc |
^ |
{1:~ }|*5
- {2:-- INSERT --} |
+ {5:-- INSERT --} |
]])
end)
end)