diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-06-29 14:39:12 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-06-29 14:39:12 +0100 |
commit | 8b5901e2f9466eb6f38f5b251e871f609f65e252 (patch) | |
tree | 430a9eae50338cd4685c7b542b51049bd2b8da5b /src | |
parent | 040674129f3382822eeb7b590380efa5228124a8 (diff) |
patch 9.0.0006: not all Visual Basic files are recognizedv9.0.0006
Problem: Not all Visual Basic files are recognized.
Solution: Change detection of *.cls files. (Doug Kearns)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/test_filetype.vim | 42 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 43 insertions, 1 deletions
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 545e33f7be..d8ddeff250 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -837,7 +837,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! @@ -1719,5 +1719,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 diff --git a/src/version.c b/src/version.c index 0e6758f742..98227fa445 100644 --- a/src/version.c +++ b/src/version.c @@ -736,6 +736,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 6, +/**/ 5, /**/ 4, |