mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
test(filetype): symlink detection works after expand('<afile>') (#31307)
Also add a test for #31306, which currently fails.
This commit is contained in:
@@ -199,7 +199,19 @@ describe('filetype.lua', function()
|
|||||||
finally(function()
|
finally(function()
|
||||||
uv.fs_unlink('Xfiletype/.config/git')
|
uv.fs_unlink('Xfiletype/.config/git')
|
||||||
end)
|
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', {}))
|
eq('gitconfig', api.nvim_get_option_value('filetype', {}))
|
||||||
end)
|
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)
|
end)
|
||||||
|
Reference in New Issue
Block a user