comparison src/testdir/test_filetype.vim @ 29463:27ebab59172e v9.0.0073

patch 9.0.0073: too many files recognized as bsdl Commit: https://github.com/vim/vim/commit/1b67f07f7626b87d9ce3e16815970988983a2ddc Author: Martin Tournoij <martin@arp242.net> Date: Mon Jul 25 21:40:06 2022 +0100 patch 9.0.0073: too many files recognized as bsdl Problem: Too many files recognized as bsdl. Solution: Use pattern "*.bsd" instead of "*bsd". (Martin Tournoij, closes #10783)
author Bram Moolenaar <Bram@vim.org>
date Mon, 25 Jul 2022 22:45:03 +0200
parents 2830faa3e100
children 7355529ee87f
comparison
equal deleted inserted replaced
29462:69dae6485ca8 29463:27ebab59172e
41 call delete('Xfile') 41 call delete('Xfile')
42 filetype off 42 filetype off
43 endfunc 43 endfunc
44 44
45 " Filetypes detected just from matching the file name. 45 " Filetypes detected just from matching the file name.
46 " First one is checking that these files have no filetype.
46 let s:filename_checks = { 47 let s:filename_checks = {
48 \ 'none': ['bsd', 'some-bsd'],
47 \ '8th': ['file.8th'], 49 \ '8th': ['file.8th'],
48 \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'], 50 \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
49 \ 'a65': ['file.a65'], 51 \ 'a65': ['file.a65'],
50 \ 'aap': ['file.aap'], 52 \ 'aap': ['file.aap'],
51 \ 'abap': ['file.abap'], 53 \ 'abap': ['file.abap'],
83 \ 'bib': ['file.bib'], 85 \ 'bib': ['file.bib'],
84 \ 'bicep': ['file.bicep'], 86 \ 'bicep': ['file.bicep'],
85 \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'], 87 \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
86 \ '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'], 88 \ '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'],
87 \ 'blank': ['file.bl'], 89 \ 'blank': ['file.bl'],
88 \ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'], 90 \ 'bsdl': ['file.bsd', 'file.bsdl'],
89 \ 'bst': ['file.bst'], 91 \ 'bst': ['file.bst'],
90 \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'], 92 \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
91 \ 'bzr': ['bzr_log.any', 'bzr_log.file'], 93 \ 'bzr': ['bzr_log.any', 'bzr_log.file'],
92 \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'], 94 \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
93 \ 'cabal': ['file.cabal'], 95 \ 'cabal': ['file.cabal'],
646 call assert_report('cannot edit "' . names[i] . '": ' . v:exception) 648 call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
647 endtry 649 endtry
648 if &filetype == '' && &readonly 650 if &filetype == '' && &readonly
649 " File exists but not able to edit it (permission denied) 651 " File exists but not able to edit it (permission denied)
650 else 652 else
651 call assert_equal(ft, &filetype, 'with file name: ' . names[i]) 653 let expected = ft == 'none' ? '' : ft
654 call assert_equal(expected, &filetype, 'with file name: ' . names[i])
652 endif 655 endif
653 bwipe! 656 bwipe!
654 endfor 657 endfor
655 endfor 658 endfor
656 set swapfile& 659 set swapfile&