From ac82dd3348d96f97f2bb1448461c9a2f372c7958 Mon Sep 17 00:00:00 2001 From: Barrett Ruth <62671086+barrettruth@users.noreply.github.com> Date: Thu, 25 Jun 2026 17:20:03 -0500 Subject: [PATCH] test(runtime): exercise dir.lua on Windows #40423 --- test/functional/plugin/dir_spec.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/functional/plugin/dir_spec.lua b/test/functional/plugin/dir_spec.lua index 6ee9841af9..de73effd43 100644 --- a/test/functional/plugin/dir_spec.lua +++ b/test/functional/plugin/dir_spec.lua @@ -241,6 +241,21 @@ describe('nvim.dir', function() line_of('new.txt') end) + it('displays filenames as buffer text and opens them from the buffer', function() + make_fixture() + n.clear({ args_rm = { '-u' } }) + + edit(root) + line_of('.hidden') + line_of('subdir/') + api.nvim_win_set_cursor(0, { line_of('alpha.txt'), 0 }) + feed('') + poke_eventloop() + + eq(file, api.nvim_buf_get_name(0)) + eq({ 'alpha' }, lines()) + end) + it('encodes special filename characters in directory buffers', function() -- Windows reserves backslash as a separator and disallows control characters in filenames. -- https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file