diff options
author | Doug Kearns <dougkearns@gmail.com> | 2022-10-17 13:32:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-17 13:32:17 +0100 |
commit | 4ac8e7948cb3e07bc4598ede8b274891d14dfa7c (patch) | |
tree | 5ba7c4cfcb8365ef4a42534b3f3bcba98b8fa74b /src/testdir | |
parent | 4913d420e8e8619cff837372bce87683d6fcaa03 (diff) | |
download | vim-git-4ac8e7948cb3e07bc4598ede8b274891d14dfa7c.tar.gz |
patch 9.0.0779: lsl and lm3 file extensions are not recognizedv9.0.0779
Problem: lsl and lm3 file extensions are not recognized.
Solution: Add *.lsl and *.lm3 patterns. (Doug Kearns, closes #11384)
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_filetype.vim | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 281642ee9..8fd6e0092 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -365,7 +365,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'], @@ -1931,4 +1931,35 @@ func Test_inc_file() filetype off endfunc +func Test_lsl_file() + filetype on + + call writefile(['looks like Linden Scripting Language'], 'Xfile.lsl', 'D') + 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! + + filetype off +endfunc + " vim: shiftwidth=2 sts=2 expandtab |