aboutsummaryrefslogtreecommitdiff
path: root/test/functional/autocmd/autocmd_spec.lua
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-01-16 06:38:50 +0800
committerzeertzjq <zeertzjq@outlook.com>2023-01-16 18:03:08 +0800
commit61d5bd561addfd4cc9917712bdf983e77137089e (patch)
tree8947d5407fe261b26867d678cc6acb3ec97e3b9b /test/functional/autocmd/autocmd_spec.lua
parentce66f158b55287924b33451b272de847ab75b332 (diff)
downloadrneovim-61d5bd561addfd4cc9917712bdf983e77137089e.tar.gz
rneovim-61d5bd561addfd4cc9917712bdf983e77137089e.tar.bz2
rneovim-61d5bd561addfd4cc9917712bdf983e77137089e.zip
refactor: remove E5500, adjust tests
Now with try_end() including more exception info, E5500 looks like redundant information. Adjust tests for more exception information.
Diffstat (limited to 'test/functional/autocmd/autocmd_spec.lua')
-rw-r--r--test/functional/autocmd/autocmd_spec.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/autocmd/autocmd_spec.lua b/test/functional/autocmd/autocmd_spec.lua
index 90254b7415..60ee9fa3a4 100644
--- a/test/functional/autocmd/autocmd_spec.lua
+++ b/test/functional/autocmd/autocmd_spec.lua
@@ -424,13 +424,13 @@ describe('autocmd', function()
end)
it('gives E814 when there are no other floating windows', function()
- eq('Vim(close):E814: Cannot close window, only autocmd window would remain',
+ eq('BufAdd Autocommands for "Xa.txt": Vim(close):E814: Cannot close window, only autocmd window would remain',
pcall_err(command, 'doautoall BufAdd'))
end)
it('gives E814 when there are other floating windows', function()
meths.open_win(0, true, {width = 10, height = 10, relative = 'editor', row = 10, col = 10})
- eq('Vim(close):E814: Cannot close window, only autocmd window would remain',
+ eq('BufAdd Autocommands for "Xa.txt": Vim(close):E814: Cannot close window, only autocmd window would remain',
pcall_err(command, 'doautoall BufAdd'))
end)
end)
@@ -476,14 +476,14 @@ describe('autocmd', function()
it('during RecordingLeave event', function()
command([[autocmd RecordingLeave * let v:event.regname = '']])
- eq('Vim(let):E46: Cannot change read-only variable "v:event.regname"',
+ eq('RecordingLeave Autocommands for "*": Vim(let):E46: Cannot change read-only variable "v:event.regname"',
pcall_err(command, 'normal! qqq'))
end)
it('during TermClose event', function()
command('autocmd TermClose * let v:event.status = 0')
command('terminal')
- eq('Vim(let):E46: Cannot change read-only variable "v:event.status"',
+ eq('TermClose Autocommands for "*": Vim(let):E46: Cannot change read-only variable "v:event.status"',
pcall_err(command, 'bdelete!'))
end)
end)