mirror of
https://github.com/neovim/neovim.git
synced 2024-12-23 20:55:18 -07:00
test(filetype): symlink detection works after expand('<afile>') (#31307)
Also add a test for #31306, which currently fails.
This commit is contained in:
parent
7d8db54441
commit
c697c49a76
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user