diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2021-06-26 13:42:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 13:42:38 -0400 |
commit | bb4fc69e93d45e539057e62e71a818e5fce0b378 (patch) | |
tree | 1b6f0c557c930ea9d95ce765dd8c967b9d349a7c /src | |
parent | 5c0b01fd887ff5043e196a0e21f03d547e65a98b (diff) | |
parent | 7a239a8a9affc2bac215dec1d08e55e1b065a4c4 (diff) | |
download | rneovim-bb4fc69e93d45e539057e62e71a818e5fce0b378.tar.gz rneovim-bb4fc69e93d45e539057e62e71a818e5fce0b378.tar.bz2 rneovim-bb4fc69e93d45e539057e62e71a818e5fce0b378.zip |
Merge pull request #14914 from janlazo/vim-8.2.3050
vim-patch:8.2.{2954,3049,3050}
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 42 |
1 files changed, 40 insertions, 2 deletions
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 71a7a2cce5..eb6151fbe1 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -161,6 +161,8 @@ let s:filename_checks = { \ 'ecd': ['file.ecd'], \ 'edif': ['file.edf', 'file.edif', 'file.edo'], \ 'elinks': ['elinks.conf'], + \ 'elixir': ['file.ex', 'file.exs', 'mix.lock'], + \ 'eelixir': ['file.eex', 'file.leex'], \ 'elm': ['file.elm'], \ 'elmfilt': ['filter-rules'], \ 'epuppet': ['file.epp'], @@ -257,7 +259,7 @@ let s:filename_checks = { \ 'jgraph': ['file.jgr'], \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'], \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'], - \ 'json': ['file.json', 'file.jsonp', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb'], + \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb'], \ 'jsp': ['file.jsp'], \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'], \ 'kivy': ['file.kv'], @@ -422,7 +424,7 @@ let s:filename_checks = { \ 'sass': ['file.sass'], \ 'sather': ['file.sa'], \ 'sbt': ['file.sbt'], - \ 'scala': ['file.scala'], + \ 'scala': ['file.scala', 'file.sc'], \ 'scheme': ['file.scm', 'file.ss', 'file.rkt'], \ 'scilab': ['file.sci', 'file.sce'], \ 'screen': ['.screenrc', 'screenrc'], @@ -765,5 +767,41 @@ func Test_pp_file() filetype off endfunc +func Test_ex_file() + filetype on + + call writefile(['arbitrary content'], 'Xfile.ex') + split Xfile.ex + call assert_equal('elixir', &filetype) + bwipe! + let g:filetype_euphoria = 'euphoria4' + split Xfile.ex + call assert_equal('euphoria4', &filetype) + bwipe! + unlet g:filetype_euphoria + + call writefile(['-- filetype euphoria comment'], 'Xfile.ex') + split Xfile.ex + call assert_equal('euphoria3', &filetype) + bwipe! + + call writefile(['--filetype euphoria comment'], 'Xfile.ex') + split Xfile.ex + call assert_equal('euphoria3', &filetype) + bwipe! + + call writefile(['ifdef '], 'Xfile.ex') + split Xfile.ex + call assert_equal('euphoria3', &filetype) + bwipe! + + call writefile(['include '], 'Xfile.ex') + split Xfile.ex + call assert_equal('euphoria3', &filetype) + bwipe! + + call delete('Xfile.ex') + filetype off +endfunc " vim: shiftwidth=2 sts=2 expandtab |