diff options
author | zeertzjq <zeertzjq@outlook.com> | 2024-11-22 19:16:54 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-22 11:16:54 +0000 |
commit | c697c49a769794fdab0b8e77bb69d4435faa3d24 (patch) | |
tree | c95874436f7baffa1cc1dcd8072949bf7e3a22a3 /test | |
parent | 7d8db544417e7811ae6e3c5398e9d0481a0ada22 (diff) | |
download | rneovim-c697c49a769794fdab0b8e77bb69d4435faa3d24.tar.gz rneovim-c697c49a769794fdab0b8e77bb69d4435faa3d24.tar.bz2 rneovim-c697c49a769794fdab0b8e77bb69d4435faa3d24.zip |
test(filetype): symlink detection works after expand('<afile>') (#31307)
Also add a test for #31306, which currently fails.
Diffstat (limited to 'test')
-rw-r--r-- | test/functional/lua/filetype_spec.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/functional/lua/filetype_spec.lua b/test/functional/lua/filetype_spec.lua index b6011d5268..6a4f8d70f3 100644 --- a/test/functional/lua/filetype_spec.lua +++ b/test/functional/lua/filetype_spec.lua @@ -199,7 +199,19 @@ describe('filetype.lua', function() finally(function() uv.fs_unlink('Xfiletype/.config/git') end) - clear({ args = { '--clean', 'Xfiletype/.config/git/config' } }) + local args = { '--clean', 'Xfiletype/.config/git/config' } + clear({ args = args }) eq('gitconfig', api.nvim_get_option_value('filetype', {})) + table.insert(args, 2, '--cmd') + table.insert(args, 3, "autocmd BufRead * call expand('<afile>')") + clear({ args = args }) + eq('gitconfig', api.nvim_get_option_value('filetype', {})) + end) + + pending('works with :doautocmd BufRead #31306', function() + clear({ args = { '--clean' } }) + eq('', api.nvim_get_option_value('filetype', {})) + command('doautocmd BufRead README.md') + eq('markdown', api.nvim_get_option_value('filetype', {})) end) end) |