vim-patch:8.2.4766: KRL files using "deffct" not recognized (#18137)

Problem:    KRL files using "deffct" not recognized.
Solution:   Adjust the pattern used for matching. (Patrick Meiser-Knosowski,
            closes vim/vim#10200)
93c7a45e86
This commit is contained in:
Christian Clason
2022-04-17 10:15:41 +02:00
committed by GitHub
parent ae325e6274
commit 670ecfc0cd
2 changed files with 13 additions and 8 deletions

View File

@@ -743,7 +743,7 @@ func Test_setfiletype_completion()
endfunc
"""""""""""""""""""""""""""""""""""""""""""""""""
" Tests for specific extentions and filetypes.
" Tests for specific extensions and filetypes.
" Keep sorted.
"""""""""""""""""""""""""""""""""""""""""""""""""
@@ -1535,11 +1535,13 @@ func Test_src_file()
bwipe!
call delete('srcfile.Src')
" KRL global def with embedded spaces, file starts with empty line(s).
call writefile(['', 'global def srcfile()'], 'srcfile.SRC')
split srcfile.SRC
call assert_equal('krl', &filetype)
bwipe!
" KRL global deffct with embedded spaces, file starts with empty line(s).
for text in ['global def srcfile()', 'global deffct srcfile()']
call writefile(['', text], 'srcfile.SRC')
split srcfile.SRC
call assert_equal('krl', &filetype, text)
bwipe!
endfor
" User may overrule file inspection
let g:filetype_src = 'src'