Mercurial > vim
changeset 29493:6c1e06abff2c v9.0.0088
patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Commit: https://github.com/vim/vim/commit/30e212dac1d29536883c36918a465a38d81d6413
Author: Gregory Anders <greg@gpanders.com>
Date: Tue Jul 26 21:42:03 2022 +0100
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 https://github.com/vim/vim/issues/10743)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 26 Jul 2022 22:45:04 +0200 |
parents | 0ee3ac75257d |
children | 32b286a8a175 |
files | runtime/autoload/dist/ft.vim src/testdir/test_filetype.vim src/version.c |
diffstat | 3 files changed, 28 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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()
--- 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