diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-06-29 18:43:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-29 18:43:56 +0200 |
commit | 1eb9624666a8478d66e693c7f00fc633a6b1b8ca (patch) | |
tree | d0ff784074aab6781b5d702ace1eabbcc5c74140 /src | |
parent | ba583f820655d3d7cf4c85854c0359c54d49ae5a (diff) | |
download | rneovim-1eb9624666a8478d66e693c7f00fc633a6b1b8ca.tar.gz rneovim-1eb9624666a8478d66e693c7f00fc633a6b1b8ca.tar.bz2 rneovim-1eb9624666a8478d66e693c7f00fc633a6b1b8ca.zip |
vim-patch:9.0.0006: not all Visual Basic files are recognized (#19153)
Problem: Not all Visual Basic files are recognized.
Solution: Change detection of *.cls files. (Doug Kearns)
https://github.com/vim/vim/commit/8b5901e2f9466eb6f38f5b251e871f609f65e252
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index a1228a07b5..88c354a55b 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -812,7 +812,7 @@ func Test_bas_file() " Visual Basic - call writefile(['Attribute VB_NAME = "Testing"'], 'Xfile.bas') + call writefile(['Attribute VB_NAME = "Testing"', 'Enum Foo', 'End Enum'], 'Xfile.bas') split Xfile.bas call assert_equal('vb', &filetype) bwipe! @@ -1692,5 +1692,45 @@ func Test_xpm_file() filetype off endfunc +func Test_cls_file() + filetype on + + call writefile(['looks like Smalltalk'], 'Xfile.cls') + split Xfile.cls + call assert_equal('st', &filetype) + bwipe! + + " Test dist#ft#FTcls() + + let g:filetype_cls = 'vb' + split Xfile.cls + call assert_equal('vb', &filetype) + bwipe! + unlet g:filetype_cls + + " TeX + + call writefile(['%'], 'Xfile.cls') + split Xfile.cls + call assert_equal('tex', &filetype) + bwipe! + + " Rexx + + call writefile(['# rexx'], 'Xfile.cls') + split Xfile.cls + call assert_equal('rexx', &filetype) + bwipe! + + " Visual Basic + + call writefile(['VERSION 1.0 CLASS'], 'Xfile.cls') + split Xfile.cls + call assert_equal('vb', &filetype) + bwipe! + + call delete('Xfile.cls') + filetype off +endfunc " vim: shiftwidth=2 sts=2 expandtab |