diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-10-18 20:05:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-18 20:05:50 +0200 |
commit | 228a04070e94ca31884f304f3a8d34e67654025d (patch) | |
tree | c76590e93ac4b62ab1b18c8a88bc86c15cbe8ae1 /src | |
parent | aa2f08a050682ed6b2ffae521feec88451f2d3c0 (diff) | |
download | rneovim-228a04070e94ca31884f304f3a8d34e67654025d.tar.gz rneovim-228a04070e94ca31884f304f3a8d34e67654025d.tar.bz2 rneovim-228a04070e94ca31884f304f3a8d34e67654025d.zip |
vim-patch:9.0.0779: lsl and lm3 file extensions are not recognized (#20704)
Problem: lsl and lm3 file extensions are not recognized.
Solution: Add *.lsl and *.lm3 patterns. (Doug Kearns, closes vim/vim#11384)
https://github.com/vim/vim/commit/4ac8e7948cb3e07bc4598ede8b274891d14dfa7c
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 34 |
1 files changed, 33 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index cecc112635..c9ec7771f4 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -366,7 +366,7 @@ let s:filename_checks = { \ 'mmp': ['file.mmp'], \ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'], \ 'modula2': ['file.m2', 'file.mi'], - \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'], + \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig', 'file.lm3'], \ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'], \ 'moo': ['file.moo'], \ 'moonscript': ['file.moon'], @@ -1963,4 +1963,36 @@ func Test_inc_file() filetype off endfunc +func Test_lsl_file() + filetype on + + call writefile(['looks like Linden Scripting Language'], 'Xfile.lsl') + split Xfile.lsl + call assert_equal('lsl', &filetype) + bwipe! + + " Test dist#ft#FTlsl() + + let g:filetype_lsl = 'larch' + split Xfile.lsl + call assert_equal('larch', &filetype) + bwipe! + unlet g:filetype_lsl + + " Larch Shared Language + + call writefile(['% larch comment'], 'Xfile.lsl') + split Xfile.lsl + call assert_equal('larch', &filetype) + bwipe! + + call writefile(['foo: trait'], 'Xfile.lsl') + split Xfile.lsl + call assert_equal('larch', &filetype) + bwipe! + + call delete('Xfile.lsl') + filetype off +endfunc + " vim: shiftwidth=2 sts=2 expandtab |