forked from aniani/vim
patch 9.0.1820: Rexx files may not be recognised
Problem: Rexx files may not be recognised Solution: Add shebang detection and improve disambiguation of *.cls files closes: #12951 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Doug Kearns <dougkearns@gmail.com>
This commit is contained in:
committed by
Christian Brabandt
parent
3e1e63de18
commit
e06afb7860
@@ -945,6 +945,8 @@ def s:GetScriptChecks(): dict<list<list<string>>>
|
||||
forth: [['#!/path/gforth']],
|
||||
icon: [['#!/path/icon']],
|
||||
crystal: [['#!/path/crystal']],
|
||||
rexx: [['#!/path/rexx'],
|
||||
['#!/path/regina']],
|
||||
}
|
||||
enddef
|
||||
|
||||
@@ -2045,7 +2047,22 @@ func Test_cls_file()
|
||||
|
||||
" Rexx
|
||||
|
||||
call writefile(['# rexx'], 'Xfile.cls')
|
||||
call writefile(['#!/usr/bin/rexx'], 'Xfile.cls')
|
||||
split Xfile.cls
|
||||
call assert_equal('rexx', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['#!/usr/bin/regina'], 'Xfile.cls')
|
||||
split Xfile.cls
|
||||
call assert_equal('rexx', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['/* Comment */'], 'Xfile.cls')
|
||||
split Xfile.cls
|
||||
call assert_equal('rexx', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['::class Foo subclass Bar public'], 'Xfile.cls')
|
||||
split Xfile.cls
|
||||
call assert_equal('rexx', &filetype)
|
||||
bwipe!
|
||||
|
||||
@@ -699,6 +699,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1820,
|
||||
/**/
|
||||
1819,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user