mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 11:28:22 +00:00
test(filetype): symlink detection works after expand('<afile>') (#31307)
Also add a test for #31306, which currently fails.
(cherry picked from commit c697c49a76
)
This commit is contained in:

committed by
github-actions[bot]
![github-actions[bot]](/assets/img/avatar_default.png)
parent
6f2786433d
commit
1a12dea191
@@ -190,7 +190,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