mirror of
https://github.com/vim/vim
synced 2025-07-16 09:12:00 +00:00
patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Problem: Pattern for detecting bitbake files is not sufficient. Solution: Adjust the pattern. (Gregory Anders, closes #10743)
This commit is contained in:
committed by
Bram Moolenaar
parent
3f0266739d
commit
30e212dac1
2
runtime/autoload/dist/ft.vim
vendored
2
runtime/autoload/dist/ft.vim
vendored
@ -519,7 +519,7 @@ export def FTinc()
|
||||
# headers so assume POV-Ray
|
||||
elseif lines =~ '^\s*\%({\|(\*\)' || lines =~? ft_pascal_keywords
|
||||
setf pascal
|
||||
elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '\w\+ = '
|
||||
elseif lines =~# '\<\%(require\|inherit\)\>' || lines =~# '[A-Z][A-Za-z0-9_:${}]*\s\+\%(??\|[?:+]\)\?= '
|
||||
setf bitbake
|
||||
else
|
||||
FTasmsyntax()
|
||||
|
@ -1864,6 +1864,31 @@ func Test_inc_file()
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['S = "${WORKDIR}"'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['DEPENDS:append = " somedep"'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['MACHINE ??= "qemu"'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['PROVIDES := "test"'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
call writefile(['RDEPENDS_${PN} += "bar"'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
call assert_equal('bitbake', &filetype)
|
||||
bwipe!
|
||||
|
||||
" asm
|
||||
call writefile(['asmsyntax=foo'], 'Xfile.inc')
|
||||
split Xfile.inc
|
||||
|
@ -735,6 +735,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
88,
|
||||
/**/
|
||||
87,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user