]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.0073: too many files recognized as bsdl v9.0.0073
authorMartin Tournoij <martin@arp242.net>
Mon, 25 Jul 2022 20:40:06 +0000 (21:40 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 25 Jul 2022 20:40:06 +0000 (21:40 +0100)
Problem:    Too many files recognized as bsdl.
Solution:   Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij,
            closes #10783)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 761ed3f283ee814174e95b01d64d83d2cf328042..ce3838d10ecab8db4a188b2c9daaf0c3040dfad4 100644 (file)
@@ -259,7 +259,7 @@ au BufNewFile,BufRead *.bb,*.bbappend,*.bbclass,*/build/conf/*.conf,*/meta{-*,}/
 au BufNewFile,BufRead */etc/blkid.tab,*/etc/blkid.tab.old   setf xml
 
 " BSDL
-au BufNewFile,BufRead *bsd,*.bsdl              setf bsdl
+au BufNewFile,BufRead *.bsd,*.bsdl                     setf bsdl
 
 " Bazel (http://bazel.io)
 autocmd BufRead,BufNewFile *.bzl,*.bazel,WORKSPACE     setf bzl
index 4be8cdc9bd0d699efd34ba464a681254feb40356..b5044297a8a1e54f61b13448286e5e4e4c14950d 100644 (file)
@@ -43,7 +43,9 @@ func Test_other_type()
 endfunc
 
 " Filetypes detected just from matching the file name.
+" First one is checking that these files have no filetype.
 let s:filename_checks = {
+    \ 'none': ['bsd', 'some-bsd'],
     \ '8th': ['file.8th'],
     \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
     \ 'a65': ['file.a65'],
@@ -85,7 +87,7 @@ let s:filename_checks = {
     \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
     \ 'bitbake': ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
     \ 'blank': ['file.bl'],
-    \ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
+    \ 'bsdl': ['file.bsd', 'file.bsdl'],
     \ 'bst': ['file.bst'],
     \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
     \ 'bzr': ['bzr_log.any', 'bzr_log.file'],
@@ -648,7 +650,8 @@ func CheckItems(checks)
       if &filetype == '' && &readonly
        " File exists but not able to edit it (permission denied)
       else
-       call assert_equal(ft, &filetype, 'with file name: ' . names[i])
+        let expected = ft == 'none' ? '' : ft
+       call assert_equal(expected, &filetype, 'with file name: ' . names[i])
       endif
       bwipe!
     endfor
index ed01c9e5cbfc0d6d49b4d609a23c1c3b6b892b7e..6d7aede80ca81cb1ef2a1385057e415e16f807a2 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    73,
 /**/
     72,
 /**/