diff options
author | Gregory Anders <greg@gpanders.com> | 2022-07-26 21:42:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-07-26 21:42:03 +0100 |
commit | 30e212dac1d29536883c36918a465a38d81d6413 (patch) | |
tree | a51daa35c9c0c644d6bb939ca9655b5dfa7fd51c | |
parent | 3f0266739db7d27cb7f03f9d131114fb0af3df71 (diff) | |
download | vim-git-30e212dac1d29536883c36918a465a38d81d6413.tar.gz |
patch 9.0.0088: pattern for detecting bitbake files is not sufficientv9.0.0088
Problem: Pattern for detecting bitbake files is not sufficient.
Solution: Adjust the pattern. (Gregory Anders, closes #10743)
-rw-r--r-- | runtime/autoload/dist/ft.vim | 2 | ||||
-rw-r--r-- | src/testdir/test_filetype.vim | 25 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 28 insertions, 1 deletions
diff --git a/runtime/autoload/dist/ft.vim b/runtime/autoload/dist/ft.vim index 708a42a05..e48575c80 100644 --- a/runtime/autoload/dist/ft.vim +++ b/runtime/autoload/dist/ft.vim @@ -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() diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index ea7bf3eca..0104fdb8f 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -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 diff --git a/src/version.c b/src/version.c index 75fe0edf9..7c584245a 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 */ /**/ + 88, +/**/ 87, /**/ 86, |