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:
Gregory Anders
2022-07-26 21:42:03 +01:00
committed by Bram Moolenaar
parent 3f0266739d
commit 30e212dac1
3 changed files with 28 additions and 1 deletions

View File

@ -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()

View File

@ -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

View File

@ -735,6 +735,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
88,
/**/
87,
/**/