From d321deb4a9b05e9d81b79ac166274f4a6e7981bf Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 27 Apr 2023 15:51:44 +0800 Subject: test: fix dependencies between test cases (#23343) Discovered using --shuffle argument of busted. --- test/functional/autocmd/tabnewentered_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/functional/autocmd/tabnewentered_spec.lua') diff --git a/test/functional/autocmd/tabnewentered_spec.lua b/test/functional/autocmd/tabnewentered_spec.lua index b186aa1f50..f3443f317d 100644 --- a/test/functional/autocmd/tabnewentered_spec.lua +++ b/test/functional/autocmd/tabnewentered_spec.lua @@ -21,9 +21,9 @@ describe('TabNewEntered', function() end) describe('with FILE as ', function() it('matches when opening a new tab for FILE', function() + clear() nvim('command', 'au! TabNewEntered Xtest-tabnewentered echom "tabnewentered:match"') - eq('tabnewentered:4:4\ntabnewentered:match', - nvim('exec', 'tabnew Xtest-tabnewentered', true)) + eq('tabnewentered:match', nvim('exec', 'tabnew Xtest-tabnewentered', true)) end) end) describe('with CTRL-W T', function() -- cgit From 1cd7824dd69ee14b734713e61bef6bb713db8547 Mon Sep 17 00:00:00 2001 From: glepnir Date: Fri, 6 Oct 2023 19:40:02 +0800 Subject: fix(ui): trigger TabNewEntered after split new tab --- test/functional/autocmd/tabnewentered_spec.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/functional/autocmd/tabnewentered_spec.lua') diff --git a/test/functional/autocmd/tabnewentered_spec.lua b/test/functional/autocmd/tabnewentered_spec.lua index f3443f317d..6e167dd55c 100644 --- a/test/functional/autocmd/tabnewentered_spec.lua +++ b/test/functional/autocmd/tabnewentered_spec.lua @@ -35,6 +35,14 @@ describe('TabNewEntered', function() eq('entered', nvim('exec', 'execute "normal \\T"', true)) end) end) + describe('with tab split #4334', function() + it('works when create a tab by using tab split command', function() + clear() + nvim('command', 'au! TabNewEntered * let b:entered = "entered"') + nvim('command', 'tab split') + eq('entered', nvim('exec', 'echo b:entered', true)) + end) + end) end) end) -- cgit