aboutsummaryrefslogtreecommitdiff
path: root/test/functional/lua/filetype_spec.lua
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
committerJosh Rahm <joshuarahm@gmail.com>2025-02-05 23:09:29 +0000
commitd5f194ce780c95821a855aca3c19426576d28ae0 (patch)
treed45f461b19f9118ad2bb1f440a7a08973ad18832 /test/functional/lua/filetype_spec.lua
parentc5d770d311841ea5230426cc4c868e8db27300a8 (diff)
parent44740e561fc93afe3ebecfd3618bda2d2abeafb0 (diff)
downloadrneovim-rahm.tar.gz
rneovim-rahm.tar.bz2
rneovim-rahm.zip
Merge remote-tracking branch 'upstream/master' into mix_20240309HEADrahm
Diffstat (limited to 'test/functional/lua/filetype_spec.lua')
-rw-r--r--test/functional/lua/filetype_spec.lua14
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..b75ff75b05 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)
+
+ it('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)