@@ -5741,50 +5741,37 @@ T['Default explorer']['works in `:edit .`'] = function()
57415741end
57425742
57435743T [' Default explorer' ][' deletes directory buffer if already visited(no alternate)' ] = function ()
5744- -- Starting with empty buffer having id 1, open and close the explorer
5744+ -- Starting with empty buffer having id 1
57455745 child .cmd (' edit ' .. test_dir_path )
57465746 close ()
57475747
5748- -- There should only be 1 buffer after closing the explorer
57495748 local bufs = child .api .nvim_list_bufs ()
57505749 eq (# bufs , 1 )
57515750
5752- -- Assert that buffer with id 1 has been deleted, otherwise it would be for directory test_dir_path
5751+ -- Assert that buffer with id 1 has been deleted, otherwise it would be named to directory test_dir_path
57535752 local is_still_one = bufs [1 ] == 1
57545753 eq (is_still_one , false )
57555754end
57565755
57575756T [' Default explorer' ][' deletes directory buffer if already visited' ] = function ()
5758- -- Starting with listed buffer having id 1, open and close the explorer
5757+ -- Starting with listed buffer having id 1
57595758 child .cmd (' edit ' .. test_file_path )
57605759 child .cmd (' edit ' .. test_dir_path )
57615760 close ()
57625761
5763- -- There should only be 1 buffer after closing the explorer
57645762 local bufs = child .api .nvim_list_bufs ()
57655763 eq (# bufs , 1 )
5766-
5767- -- Assert that the buffer id is still 1
5768- local bufid = bufs [1 ]
5769- eq (bufid , 1 )
5764+ eq (bufs [1 ], 1 )
57705765end
57715766
57725767T [' Default explorer' ][' does not crash on external `vim.api.nvim_set_current_win`' ] = function ()
5773- -- BufEnter Autocommands for "*": Vim(append):Lua callback : Invalid buffer id: 2
5774-
57755768 child .cmd (' edit ' .. test_file_path )
57765769 child .cmd (' edit ' .. test_dir_path )
5777-
5778- -- Mimic MiniPick when stopping the picker(H.picker_stop -> H.set_curwin)
57795770 child .lua ([[
57805771 local win_id = vim.api.nvim_list_wins()[1] -- win id 1000
57815772 vim.api.nvim_set_current_win(win_id)
57825773 ]] )
5783-
57845774 child .expect_screenshot ()
5785- close ()
5786- child .expect_screenshot ()
5787- eq (# child .api .nvim_list_bufs (), 1 )
57885775end
57895776
57905777T [' Default explorer' ][' works in `:vsplit .`' ] = function ()
0 commit comments