annotate src/testdir/test_filetype.vim @ 28507:73f235d0b6c8 v8.2.4778

patch 8.2.4778: pacman files use dosini filetype Commit: https://github.com/vim/vim/commit/35cff32dd82e5e2b72453b9f27d0655fc5b8a639 Author: Chaoren Lin <aoe@google.com> Date: Sun Apr 17 21:15:48 2022 +0100 patch 8.2.4778: pacman files use dosini filetype Problem: Pacman files use dosini filetype. Solution: Use conf instead. (Chaoren Lin, closes https://github.com/vim/vim/issues/10213)
author Bram Moolenaar <Bram@vim.org>
date Sun, 17 Apr 2022 22:30:03 +0200
parents 75f181bef230
children 6a1e5b188374
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11459
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test :setfiletype
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 func Test_detection()
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 filetype on
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 augroup filetypedetect
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 au BufNewFile,BufRead * call assert_equal(1, did_filetype())
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 augroup END
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 new something.vim
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 call assert_equal('vim', &filetype)
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 bwipe!
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 filetype off
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 endfunc
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 func Test_conf_type()
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 filetype on
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call writefile(['# some comment', 'must be conf'], 'Xfile')
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 augroup filetypedetect
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 au BufNewFile,BufRead * call assert_equal(0, did_filetype())
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 augroup END
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 split Xfile
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 call assert_equal('conf', &filetype)
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 bwipe!
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 call delete('Xfile')
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 filetype off
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 endfunc
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 func Test_other_type()
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 filetype on
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 augroup filetypedetect
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 au BufNewFile,BufRead * call assert_equal(0, did_filetype())
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 au BufNewFile,BufRead Xfile setf testfile
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 au BufNewFile,BufRead * call assert_equal(1, did_filetype())
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 augroup END
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 call writefile(['# some comment', 'must be conf'], 'Xfile')
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 split Xfile
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 call assert_equal('testfile', &filetype)
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 bwipe!
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 call delete('Xfile')
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 filetype off
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 endfunc
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
44
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
45 " Filetypes detected just from matching the file name.
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
46 let s:filename_checks = {
17528
62a6d99082f7 patch 8.1.1762: some filetype rules are in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 17526
diff changeset
47 \ '8th': ['file.8th'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
48 \ 'a2ps': ['/etc/a2ps.cfg', '/etc/a2ps/file.cfg', 'a2psrc', '.a2psrc', 'any/etc/a2ps.cfg', 'any/etc/a2ps/file.cfg'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
49 \ 'a65': ['file.a65'],
17528
62a6d99082f7 patch 8.1.1762: some filetype rules are in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 17526
diff changeset
50 \ 'aap': ['file.aap'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
51 \ 'abap': ['file.abap'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
52 \ 'abc': ['file.abc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
53 \ 'abel': ['file.abl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
54 \ 'acedb': ['file.wrm'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
55 \ 'ada': ['file.adb', 'file.ads', 'file.ada', 'file.gpr'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
56 \ 'ahdl': ['file.tdf'],
21483
de74d764d36c patch 8.2.1292: AIDL filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21018
diff changeset
57 \ 'aidl': ['file.aidl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
58 \ 'alsaconf': ['.asoundrc', '/usr/share/alsa/alsa.conf', '/etc/asound.conf', 'any/etc/asound.conf', 'any/usr/share/alsa/alsa.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
59 \ 'aml': ['file.aml'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
60 \ 'ampl': ['file.run'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
61 \ 'ant': ['build.xml'],
25832
be15ebb4098c patch 8.2.3451: not all apache files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 25794
diff changeset
62 \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file', '/etc/httpd/mods-some/file', '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
63 \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
64 \ 'applescript': ['file.scpt'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
65 \ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
66 \ 'arch': ['.arch-inventory', '=tagging-method'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
67 \ 'arduino': ['file.ino', 'file.pde'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
68 \ 'art': ['file.art'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
69 \ 'asciidoc': ['file.asciidoc', 'file.adoc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
70 \ 'asn': ['file.asn', 'file.asn1'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
71 \ 'asterisk': ['asterisk/file.conf', 'asterisk/file.conf-file', 'some-asterisk/file.conf', 'some-asterisk/file.conf-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
72 \ 'atlas': ['file.atl', 'file.as'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
73 \ 'autohotkey': ['file.ahk'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
74 \ 'autoit': ['file.au3'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
75 \ 'automake': ['GNUmakefile.am', 'makefile.am', 'Makefile.am'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
76 \ 'ave': ['file.ave'],
21817
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
77 \ 'awk': ['file.awk', 'file.gawk'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
78 \ 'b': ['file.mch', 'file.ref', 'file.imp'],
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
79 \ 'basic': ['file.bas', 'file.bi', 'file.bm'],
22033
cdf95988615a patch 8.2.1566: not all Bazel files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 21849
diff changeset
80 \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
81 \ 'bc': ['file.bc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
82 \ 'bdf': ['file.bdf'],
23960
dbc6c893a67a patch 8.2.2522: Beancount filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23721
diff changeset
83 \ 'beancount': ['file.beancount'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
84 \ 'bib': ['file.bib'],
27770
219471ed2fec patch 8.2.4411: bicep files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27653
diff changeset
85 \ 'bicep': ['file.bicep'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
86 \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
87 \ 'blank': ['file.bl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
88 \ 'bsdl': ['file.bsd', 'file.bsdl', 'bsd', 'some-bsd'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
89 \ 'bst': ['file.bst'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
90 \ 'bzr': ['bzr_log.any', 'bzr_log.file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
91 \ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
92 \ 'cabal': ['file.cabal'],
22971
f39f960f3ea0 patch 8.2.2032: cabalconfig and cabalproject filetypes not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22918
diff changeset
93 \ 'cabalconfig': ['cabal.config'],
f39f960f3ea0 patch 8.2.2032: cabalconfig and cabalproject filetypes not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22918
diff changeset
94 \ 'cabalproject': ['cabal.project', 'cabal.project.local'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
95 \ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
96 \ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
97 \ 'cdl': ['file.cdl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
98 \ 'cdrdaoconf': ['/etc/cdrdao.conf', '/etc/defaults/cdrdao', '/etc/default/cdrdao', '.cdrdao', 'any/etc/cdrdao.conf', 'any/etc/default/cdrdao', 'any/etc/defaults/cdrdao'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
99 \ 'cdrtoc': ['file.toc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
100 \ 'cf': ['file.cfm', 'file.cfi', 'file.cfc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
101 \ 'cfengine': ['cfengine.conf'],
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
102 \ 'cfg': ['file.hgrc', 'filehgrc', 'hgrc', 'some-hgrc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
103 \ 'ch': ['file.chf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
104 \ 'chaiscript': ['file.chai'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
105 \ 'chaskell': ['file.chs'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
106 \ 'chill': ['file..ch'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
107 \ 'chordpro': ['file.chopro', 'file.crd', 'file.cho', 'file.crdpro', 'file.chordpro'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
108 \ 'cl': ['file.eni'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
109 \ 'clean': ['file.dcl', 'file.icl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
110 \ 'clojure': ['file.clj', 'file.cljs', 'file.cljx', 'file.cljc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
111 \ 'cmake': ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
112 \ 'cmusrc': ['any/.cmus/autosave', 'any/.cmus/rc', 'any/.cmus/command-history', 'any/.cmus/file.theme', 'any/cmus/rc', 'any/cmus/file.theme', '/.cmus/autosave', '/.cmus/command-history', '/.cmus/file.theme', '/.cmus/rc', '/cmus/file.theme', '/cmus/rc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
113 \ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
114 \ 'coco': ['file.atg'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
115 \ 'conaryrecipe': ['file.recipe'],
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
116 \ 'conf': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'auto.master'],
25971
217cd7833e8b patch 8.2.3519: TOML files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25935
diff changeset
117 \ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file'],
22834
fcbded1e3602 patch 8.2.1964: not all ConTeXt files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 22673
diff changeset
118 \ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
28393
860c2c6bcdfd patch 8.2.4721: cooklang files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28390
diff changeset
119 \ 'cook': ['file.cook'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
120 \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
121 \ 'crm': ['file.crm'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
122 \ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
26570
b1f4052d6c51 patch 8.2.3814: .csx files and .sln files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26552
diff changeset
123 \ 'cs': ['file.cs', 'file.csx'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
124 \ 'csc': ['file.csc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
125 \ 'csdl': ['file.csdl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
126 \ 'csp': ['file.csp', 'file.fdr'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
127 \ 'css': ['file.css'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
128 \ 'cterm': ['file.con'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
129 \ 'cucumber': ['file.feature'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
130 \ 'cuda': ['file.cu', 'file.cuh'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
131 \ 'cupl': ['file.pld'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
132 \ 'cuplsim': ['file.si'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
133 \ 'cvs': ['cvs123'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
134 \ 'cvsrc': ['.cvsrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
135 \ 'cynpp': ['file.cyn'],
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
136 \ 'd': ['file.d'],
18366
c6826a74ad9b patch 8.1.2177: Dart files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 18362
diff changeset
137 \ 'dart': ['file.dart', 'file.drt'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
138 \ 'datascript': ['file.ds'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
139 \ 'dcd': ['file.dcd'],
22462
89566aaebfb2 patch 8.2.1779: some debian changelog files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22353
diff changeset
140 \ 'debchangelog': ['changelog.Debian', 'changelog.dch', 'NEWS.Debian', 'NEWS.dch', '/debian/changelog'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
141 \ 'debcontrol': ['/debian/control', 'any/debian/control'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
142 \ 'debcopyright': ['/debian/copyright', 'any/debian/copyright'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
143 \ 'debsources': ['/etc/apt/sources.list', '/etc/apt/sources.list.d/file.list', 'any/etc/apt/sources.list', 'any/etc/apt/sources.list.d/file.list'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
144 \ 'def': ['file.def'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
145 \ 'denyhosts': ['denyhosts.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
146 \ 'desc': ['file.desc'],
20804
ad15725594f8 patch 8.2.0954: not all desktop files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 20756
diff changeset
147 \ 'desktop': ['file.desktop', '.directory', 'file.directory'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
148 \ 'dictconf': ['dict.conf', '.dictrc'],
25848
86c3af1be1db patch 8.2.3458: not all dictdconf files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 25834
diff changeset
149 \ 'dictdconf': ['dictd.conf', 'dictdfile.conf', 'dictd-file.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
150 \ 'diff': ['file.diff', 'file.rej'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
151 \ 'dircolors': ['.dir_colors', '.dircolors', '/etc/DIR_COLORS', 'any/etc/DIR_COLORS'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
152 \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
26761
3dbb8fdcd179 patch 8.2.3909: Containerfile using prefix name not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26753
diff changeset
153 \ 'dockerfile': ['Containerfile', 'Dockerfile', 'file.Dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
154 \ 'dosbatch': ['file.bat'],
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
155 \ 'dosini': ['.editorconfig', '/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap'],
19205
861b1cc1a8a2 patch 8.2.0161: not recognizing .gv file as dot filetype
Bram Moolenaar <Bram@vim.org>
parents: 19164
diff changeset
156 \ 'dot': ['file.dot', 'file.gv'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
157 \ 'dracula': ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
158 \ 'dtd': ['file.dtd'],
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
159 \ 'dtrace': ['/usr/lib/dtrace/io.d'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
160 \ 'dts': ['file.dts', 'file.dtsi'],
23430
9e60204aea6e patch 8.2.2258: not all OCaml related files are detected
Bram Moolenaar <Bram@vim.org>
parents: 23316
diff changeset
161 \ 'dune': ['jbuild', 'dune', 'dune-project', 'dune-workspace'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
162 \ 'dylan': ['file.dylan'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
163 \ 'dylanintr': ['file.intr'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
164 \ 'dylanlid': ['file.lid'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
165 \ 'ecd': ['file.ecd'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
166 \ 'edif': ['file.edf', 'file.edif', 'file.edo'],
21018
2b07e2e7d95b patch 8.2.1060: not all elinks files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 21008
diff changeset
167 \ 'elinks': ['elinks.conf'],
25026
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
168 \ 'elixir': ['file.ex', 'file.exs', 'mix.lock'],
28417
bca485676073 patch 8.2.4733: HEEx and Surface do need a separate filetype
Bram Moolenaar <Bram@vim.org>
parents: 28409
diff changeset
169 \ 'eelixir': ['file.eex', 'file.leex'],
20579
6e6c98dc5732 patch 8.2.0843: filetype elm not detected
Bram Moolenaar <Bram@vim.org>
parents: 20361
diff changeset
170 \ 'elm': ['file.elm'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
171 \ 'elmfilt': ['filter-rules'],
28277
4e2753f7ec65 patch 8.2.4664: Elvish files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28265
diff changeset
172 \ 'elvish': ['file.elv'],
23721
002fd1de0968 patch 8.2.2402: some filetypes not detected
Bram Moolenaar <Bram@vim.org>
parents: 23701
diff changeset
173 \ 'epuppet': ['file.epp'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
174 \ 'erlang': ['file.erl', 'file.hrl', 'file.yaws'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
175 \ 'eruby': ['file.erb', 'file.rhtml'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
176 \ 'esmtprc': ['anyesmtprc', 'esmtprc', 'some-esmtprc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
177 \ 'esqlc': ['file.ec', 'file.EC'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
178 \ 'esterel': ['file.strl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
179 \ 'eterm': ['anyEterm/file.cfg', 'Eterm/file.cfg', 'some-Eterm/file.cfg'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
180 \ 'exim': ['exim.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
181 \ 'expect': ['file.exp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
182 \ 'exports': ['exports'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
183 \ 'factor': ['file.factor'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
184 \ 'falcon': ['file.fal'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
185 \ 'fan': ['file.fan', 'file.fwt'],
23701
c5b5e7520fe2 patch 8.2.2392: fennel filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23685
diff changeset
186 \ 'fennel': ['file.fnl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
187 \ 'fetchmail': ['.fetchmailrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
188 \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
26141
77ad8ea01c00 patch 8.2.3603: fish filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26133
diff changeset
189 \ 'fish': ['file.fish'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
190 \ 'focexec': ['file.fex', 'file.focexec'],
27493
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
191 \ 'form': ['file.frm'],
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 26309
diff changeset
192 \ 'forth': ['file.ft', 'file.fth'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
193 \ 'fortran': ['file.f', 'file.for', 'file.fortran', 'file.fpp', 'file.ftn', 'file.f77', 'file.f90', 'file.f95', 'file.f03', 'file.f08'],
24523
71bd205c72f5 patch 8.2.2801: free Pascal makefile not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24496
diff changeset
194 \ 'fpcmake': ['file.fpc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
195 \ 'framescript': ['file.fsl'],
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
196 \ 'freebasic': ['file.fb'],
26344
36f3a77e4b8c patch 8.2.3703: most people call F# "fsharp" and not "fs"
Bram Moolenaar <Bram@vim.org>
parents: 26311
diff changeset
197 \ 'fsharp': ['file.fs', 'file.fsi', 'file.fsx'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
198 \ 'fstab': ['fstab', 'mtab'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
199 \ 'fusion': ['file.fusion'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
200 \ 'fvwm': ['/.fvwm/file', 'any/.fvwm/file'],
28093
3fd6b3ebe0b7 patch 8.2.4571: not all gdb files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 27883
diff changeset
201 \ 'gdb': ['.gdbinit', 'gdbinit', 'file.gdb', '.config/gdbearlyinit', '.gdbearlyinit'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
202 \ 'gdresource': ['file.tscn', 'file.tres'],
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
203 \ 'gdscript': ['file.gd'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
204 \ 'gdmo': ['file.mo', 'file.gdmo'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
205 \ 'gedcom': ['file.ged', 'lltxxxxx.txt', '/tmp/lltmp', '/tmp/lltmp-file', 'any/tmp/lltmp', 'any/tmp/lltmp-file'],
25100
d5f856033f6b patch 8.2.3087: Gemtext files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25096
diff changeset
206 \ 'gemtext': ['file.gmi', 'file.gemini'],
23316
32cc5e9875bb patch 8.2.2203: Moodle gift files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23132
diff changeset
207 \ 'gift': ['file.gift'],
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
208 \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 'NOTES_EDITMSG', 'EDIT_DESCRIPTION'],
27319
c6533967ca9f patch 8.2.4188: not all gitconfig files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 27317
diff changeset
209 \ 'gitconfig': ['file.git/config', 'file.git/config.worktree', 'file.git/worktrees/x/config.worktree', '.gitconfig', '.gitmodules', 'file.git/modules//config', '/.config/git/config', '/etc/gitconfig', '/usr/local/etc/gitconfig', '/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
210 \ 'gitolite': ['gitolite.conf', '/gitolite-admin/conf/file', 'any/gitolite-admin/conf/file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
211 \ 'gitrebase': ['git-rebase-todo'],
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
212 \ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
213 \ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
214 \ 'glsl': ['file.glsl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
215 \ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
27317
839be955609f patch 8.2.4187: gnuplot file not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27287
diff changeset
216 \ 'gnuplot': ['file.gpi', '.gnuplot'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
217 \ 'go': ['file.go'],
26688
4b8d0a62f78b patch 8.2.3873: go.mod files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26628
diff changeset
218 \ 'gomod': ['go.mod'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
219 \ 'gowork': ['go.work'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
220 \ 'gp': ['file.gp', '.gprc'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
221 \ 'gpg': ['/.gnupg/options', '/.gnupg/gpg.conf', '/usr/any/gnupg/options.skel', 'any/.gnupg/gpg.conf', 'any/.gnupg/options', 'any/usr/any/gnupg/options.skel'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
222 \ 'grads': ['file.gs'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
223 \ 'graphql': ['file.graphql', 'file.graphqls', 'file.gql'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
224 \ 'gretl': ['file.gretl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
225 \ 'groovy': ['file.gradle', 'file.groovy'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
226 \ 'group': ['any/etc/group', 'any/etc/group-', 'any/etc/group.edit', 'any/etc/gshadow', 'any/etc/gshadow-', 'any/etc/gshadow.edit', 'any/var/backups/group.bak', 'any/var/backups/gshadow.bak', '/etc/group', '/etc/group-', '/etc/group.edit', '/etc/gshadow', '/etc/gshadow-', '/etc/gshadow.edit', '/var/backups/group.bak', '/var/backups/gshadow.bak'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
227 \ 'grub': ['/boot/grub/menu.lst', '/boot/grub/grub.conf', '/etc/grub.conf', 'any/boot/grub/grub.conf', 'any/boot/grub/menu.lst', 'any/etc/grub.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
228 \ 'gsp': ['file.gsp'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
229 \ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
230 \ 'hack': ['file.hack', 'file.hackpartial'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
231 \ 'haml': ['file.haml'],
22989
7160e85d62ff patch 8.2.2041: haskell filetype not optimally recognized
Bram Moolenaar <Bram@vim.org>
parents: 22971
diff changeset
232 \ 'hamster': ['file.hsm'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
233 \ 'handlebars': ['file.hbs'],
24681
1077a2762d06 patch 8.2.2879: file extension .hsig not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24598
diff changeset
234 \ 'haskell': ['file.hs', 'file.hsc', 'file.hs-boot', 'file.hsig'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
235 \ 'haste': ['file.ht'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
236 \ 'hastepreproc': ['file.htpp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
237 \ 'hb': ['file.hb'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
238 \ 'hcl': ['file.hcl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
239 \ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
28417
bca485676073 patch 8.2.4733: HEEx and Surface do need a separate filetype
Bram Moolenaar <Bram@vim.org>
parents: 28409
diff changeset
240 \ 'heex': ['file.heex'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
241 \ 'hex': ['file.hex', 'file.h32'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
242 \ 'hgcommit': ['hg-editor-file.txt'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
243 \ 'hjson': ['file.hjson'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
244 \ 'hog': ['file.hog', 'snort.conf', 'vision.conf'],
18362
8144f89e6f28 patch 8.1.2175: meson files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 17867
diff changeset
245 \ 'hollywood': ['file.hws'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
246 \ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
247 \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
26552
297984d49331 patch 8.2.3805: i3config files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26478
diff changeset
248 \ 'i3config': ['/home/user/.i3/config', '/home/user/.config/i3/config', '/etc/i3/config', '/etc/xdg/i3/config'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
249 \ 'logcheck': ['/etc/logcheck/file.d-some/file', '/etc/logcheck/file.d/file', 'any/etc/logcheck/file.d-some/file', 'any/etc/logcheck/file.d/file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
250 \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
251 \ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
252 \ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
253 \ 'opl': ['file.OPL', 'file.OPl', 'file.OpL', 'file.Opl', 'file.oPL', 'file.oPl', 'file.opL', 'file.opl'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
254 \ 'pcmk': ['file.pcmk'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
255 \ 'r': ['file.r'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
256 \ 'rhelp': ['file.rd'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
257 \ 'rmd': ['file.rmd', 'file.smd'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
258 \ 'rnoweb': ['file.rnw', 'file.snw'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
259 \ 'rrst': ['file.rrst', 'file.srst'],
16562
a6c073fa99e1 patch 8.1.1284: detecting *.tmpl as htmlcheetah is outdated
Bram Moolenaar <Bram@vim.org>
parents: 16364
diff changeset
260 \ 'template': ['file.tmpl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
261 \ 'htmlm4': ['file.html.m4'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
262 \ 'httest': ['file.htt', 'file.htb'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
263 \ 'ibasic': ['file.iba', 'file.ibi'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
264 \ 'icemenu': ['/.icewm/menu', 'any/.icewm/menu'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
265 \ 'icon': ['file.icn'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
266 \ 'indent': ['.indent.pro', 'indentrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
267 \ 'inform': ['file.inf', 'file.INF'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
268 \ 'initng': ['/etc/initng/any/file.i', 'file.ii', 'any/etc/initng/any/file.i'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
269 \ 'inittab': ['inittab'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
270 \ 'ipfilter': ['ipf.conf', 'ipf6.conf', 'ipf.rules'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
271 \ 'iss': ['file.iss'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
272 \ 'ist': ['file.ist', 'file.mst'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
273 \ 'j': ['file.ijs'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
274 \ 'jal': ['file.jal', 'file.JAL'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
275 \ 'jam': ['file.jpl', 'file.jpr', 'JAM-file.file', 'JAM.file', 'Prl-file.file', 'Prl.file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
276 \ 'java': ['file.java', 'file.jav'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
277 \ 'javacc': ['file.jj', 'file.jjt'],
18707
e190e64d253b patch 8.1.2345: .cjs files are not recognized as Javascript
Bram Moolenaar <Bram@vim.org>
parents: 18489
diff changeset
278 \ 'javascript': ['file.js', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
27796
8fdc92bdcff1 patch 8.2.4424: ".gts" and ".gjs" files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27776
diff changeset
279 \ 'javascript.glimmer': ['file.gjs'],
17867
180fb9981255 patch 8.1.1930: cannot recognize .jsx and .tsx files
Bram Moolenaar <Bram@vim.org>
parents: 17555
diff changeset
280 \ 'javascriptreact': ['file.jsx'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
281 \ 'jess': ['file.clp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
282 \ 'jgraph': ['file.jgr'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
283 \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
284 \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file'],
26702
1ef0c9a92168 patch 8.2.3880: Solution filter files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26688
diff changeset
285 \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.babelrc', '.eslintrc', '.prettierrc', '.firebaserc', 'file.slnf'],
27326
234516a43f33 patch 8.2.4191: json5 files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27319
diff changeset
286 \ 'json5': ['file.json5'],
25096
d0625ed91013 patch 8.2.3085: JSONC files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25026
diff changeset
287 \ 'jsonc': ['file.jsonc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
288 \ 'jsp': ['file.jsp'],
25493
224c96c497d3 patch 8.2.3283: Julia filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25100
diff changeset
289 \ 'julia': ['file.jl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
290 \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
291 \ 'kivy': ['file.kv'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
292 \ 'kix': ['file.kix'],
19263
06d9be5c0107 patch 8.2.0190: Kotlin files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 19205
diff changeset
293 \ 'kotlin': ['file.kt', 'file.ktm', 'file.kts'],
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
294 \ 'krl': ['file.sub', 'file.Sub', 'file.SUB'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
295 \ 'kscript': ['file.ks'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
296 \ 'kwt': ['file.k'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
297 \ 'lace': ['file.ace', 'file.ACE'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
298 \ 'latte': ['file.latte', 'file.lte'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
299 \ 'ld': ['file.ld'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
300 \ 'ldif': ['file.ldif'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
301 \ 'ledger': ['file.ldg', 'file.ledger', 'file.journal'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
302 \ 'less': ['file.less'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
303 \ 'lex': ['file.lex', 'file.l', 'file.lxx', 'file.l++'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
304 \ 'lftp': ['lftp.conf', '.lftprc', 'anylftp/rc', 'lftp/rc', 'some-lftp/rc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
305 \ 'lhaskell': ['file.lhs'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
306 \ 'libao': ['/etc/libao.conf', '/.libao', 'any/.libao', 'any/etc/libao.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
307 \ 'lifelines': ['file.ll'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
308 \ 'lilo': ['lilo.conf', 'lilo.conf-file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
309 \ 'limits': ['/etc/limits', '/etc/anylimits.conf', '/etc/anylimits.d/file.conf', '/etc/limits.conf', '/etc/limits.d/file.conf', '/etc/some-limits.conf', '/etc/some-limits.d/file.conf', 'any/etc/limits', 'any/etc/limits.conf', 'any/etc/limits.d/file.conf', 'any/etc/some-limits.conf', 'any/etc/some-limits.d/file.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
310 \ 'liquid': ['file.liquid'],
26871
c8d32e12c934 patch 8.2.3964: some common lisp and scheme files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26761
diff changeset
311 \ 'lisp': ['file.lsp', 'file.lisp', 'file.asd', 'file.el', 'file.cl', '.emacs', '.sawfishrc', 'sbclrc', '.sbclrc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
312 \ 'lite': ['file.lite', 'file.lt'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
313 \ 'litestep': ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
314 \ 'loginaccess': ['/etc/login.access', 'any/etc/login.access'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
315 \ 'logindefs': ['/etc/login.defs', 'any/etc/login.defs'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
316 \ 'logtalk': ['file.lgt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
317 \ 'lotos': ['file.lot', 'file.lotos'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
318 \ 'lout': ['file.lou', 'file.lout'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
319 \ 'lprolog': ['file.sig'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
320 \ 'lsl': ['file.lsl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
321 \ 'lss': ['file.lss'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
322 \ 'lua': ['file.lua', 'file.rockspec', 'file.nse'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
323 \ 'lynx': ['lynx.cfg'],
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
324 \ 'matlab': ['file.m'],
24458
1d126cb683c1 patch 8.2.2769: Modula-3 config files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24347
diff changeset
325 \ 'm3build': ['m3makefile', 'm3overrides'],
1d126cb683c1 patch 8.2.2769: Modula-3 config files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24347
diff changeset
326 \ 'm3quake': ['file.quake', 'cm3.cfg'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
327 \ 'm4': ['file.at'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
328 \ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml', 'reportbug-file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
329 \ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases', 'any/etc/aliases', 'any/etc/mail/aliases'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
330 \ 'mailcap': ['.mailcap', 'mailcap'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
331 \ 'make': ['file.mk', 'file.mak', 'file.dsp', 'makefile', 'Makefile', 'makefile-file', 'Makefile-file', 'some-makefile', 'some-Makefile'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
332 \ 'mallard': ['file.page'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
333 \ 'man': ['file.man'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
334 \ 'manconf': ['/etc/man.conf', 'man.config', 'any/etc/man.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
335 \ 'map': ['file.map'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
336 \ 'maple': ['file.mv', 'file.mpl', 'file.mws'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
337 \ 'markdown': ['file.markdown', 'file.mdown', 'file.mkd', 'file.mkdn', 'file.mdwn', 'file.md'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
338 \ 'mason': ['file.mason', 'file.mhtml', 'file.comp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
339 \ 'master': ['file.mas', 'file.master'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
340 \ 'mel': ['file.mel'],
18362
8144f89e6f28 patch 8.1.2175: meson files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 17867
diff changeset
341 \ 'meson': ['meson.build', 'meson_options.txt'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
342 \ 'messages': ['/log/auth', '/log/cron', '/log/daemon', '/log/debug', '/log/kern', '/log/lpr', '/log/mail', '/log/messages', '/log/news/news', '/log/syslog', '/log/user',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
343 \ '/log/auth.log', '/log/cron.log', '/log/daemon.log', '/log/debug.log', '/log/kern.log', '/log/lpr.log', '/log/mail.log', '/log/messages.log', '/log/news/news.log', '/log/syslog.log', '/log/user.log',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
344 \ '/log/auth.err', '/log/cron.err', '/log/daemon.err', '/log/debug.err', '/log/kern.err', '/log/lpr.err', '/log/mail.err', '/log/messages.err', '/log/news/news.err', '/log/syslog.err', '/log/user.err',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
345 \ '/log/auth.info', '/log/cron.info', '/log/daemon.info', '/log/debug.info', '/log/kern.info', '/log/lpr.info', '/log/mail.info', '/log/messages.info', '/log/news/news.info', '/log/syslog.info', '/log/user.info',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
346 \ '/log/auth.warn', '/log/cron.warn', '/log/daemon.warn', '/log/debug.warn', '/log/kern.warn', '/log/lpr.warn', '/log/mail.warn', '/log/messages.warn', '/log/news/news.warn', '/log/syslog.warn', '/log/user.warn',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
347 \ '/log/auth.crit', '/log/cron.crit', '/log/daemon.crit', '/log/debug.crit', '/log/kern.crit', '/log/lpr.crit', '/log/mail.crit', '/log/messages.crit', '/log/news/news.crit', '/log/syslog.crit', '/log/user.crit',
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
348 \ '/log/auth.notice', '/log/cron.notice', '/log/daemon.notice', '/log/debug.notice', '/log/kern.notice', '/log/lpr.notice', '/log/mail.notice', '/log/messages.notice', '/log/news/news.notice', '/log/syslog.notice', '/log/user.notice'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
349 \ 'mf': ['file.mf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
350 \ 'mgl': ['file.mgl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
351 \ 'mgp': ['file.mgp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
352 \ 'mib': ['file.mib', 'file.my'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
353 \ 'mix': ['file.mix', 'file.mixal'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
354 \ 'mma': ['file.nb'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
355 \ 'mmp': ['file.mmp'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
356 \ 'modconf': ['/etc/modules.conf', '/etc/modules', '/etc/conf.modules', '/etc/modprobe.file', 'any/etc/conf.modules', 'any/etc/modprobe.file', 'any/etc/modules', 'any/etc/modules.conf'],
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
357 \ 'modula2': ['file.m2', 'file.mi'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
358 \ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
359 \ 'moo': ['file.moo'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
360 \ 'mp': ['file.mp'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
361 \ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
362 \ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
363 \ 'msidl': ['file.odl', 'file.mof'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
364 \ 'msql': ['file.msql'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
365 \ 'mupad': ['file.mu'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
366 \ 'mush': ['file.mush'],
26398
34548fb19e0e patch 8.2.3730: "/etc/Muttrc.d/README" gets filetype muttrc
Bram Moolenaar <Bram@vim.org>
parents: 26396
diff changeset
367 \ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', '/etc/Muttrc.d/file.rc', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
368 \ 'mysql': ['file.mysql'],
12052
7eb512f2a896 patch 8.0.0906: don't recognize Couchbase files
Christian Brabandt <cb@256bit.org>
parents: 12029
diff changeset
369 \ 'n1ql': ['file.n1ql', 'file.nql'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
370 \ 'named': ['namedfile.conf', 'rndcfile.conf', 'named-file.conf', 'named.conf', 'rndc-file.conf', 'rndc-file.key', 'rndc.conf', 'rndc.key'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
371 \ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
372 \ 'ncf': ['file.ncf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
373 \ 'netrc': ['.netrc'],
25860
a7305a9b32ba patch 8.2.3464: nginx files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25848
diff changeset
374 \ 'nginx': ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
375 \ 'ninja': ['file.ninja'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
376 \ 'nix': ['file.nix'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
377 \ 'nqc': ['file.nqc'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
378 \ 'nroff': ['file.tr', 'file.nr', 'file.roff', 'file.tmac', 'file.mom', 'tmac.file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
379 \ 'nsis': ['file.nsi', 'file.nsh'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
380 \ 'obj': ['file.obj'],
23430
9e60204aea6e patch 8.2.2258: not all OCaml related files are detected
Bram Moolenaar <Bram@vim.org>
parents: 23316
diff changeset
381 \ 'ocaml': ['file.ml', 'file.mli', 'file.mll', 'file.mly', '.ocamlinit', 'file.mlt', 'file.mlp', 'file.mlip', 'file.mli.cppo', 'file.ml.cppo'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
382 \ 'occam': ['file.occ'],
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
383 \ 'octave': ['octaverc', '.octaverc', 'octave.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
384 \ 'omnimark': ['file.xom', 'file.xin'],
23430
9e60204aea6e patch 8.2.2258: not all OCaml related files are detected
Bram Moolenaar <Bram@vim.org>
parents: 23316
diff changeset
385 \ 'opam': ['opam', 'file.opam', 'file.opam.template'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
386 \ 'openroad': ['file.or'],
28485
75f181bef230 patch 8.2.4767: openscad files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28483
diff changeset
387 \ 'openscad': ['file.scad'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
388 \ 'ora': ['file.ora'],
28265
67ef250562e5 patch 8.2.4658: org-mode files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28093
diff changeset
389 \ 'org': ['file.org', 'file.org_archive'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
390 \ 'pamconf': ['/etc/pam.conf', '/etc/pam.d/file', 'any/etc/pam.conf', 'any/etc/pam.d/file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
391 \ 'pamenv': ['/etc/security/pam_env.conf', '/home/user/.pam_environment', '.pam_environment', 'pam_env.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
392 \ 'papp': ['file.papp', 'file.pxml', 'file.pxsl'],
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
393 \ 'pascal': ['file.pas', 'file.dpr', 'file.lpr'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
394 \ 'passwd': ['any/etc/passwd', 'any/etc/passwd-', 'any/etc/passwd.edit', 'any/etc/shadow', 'any/etc/shadow-', 'any/etc/shadow.edit', 'any/var/backups/passwd.bak', 'any/var/backups/shadow.bak', '/etc/passwd', '/etc/passwd-', '/etc/passwd.edit', '/etc/shadow', '/etc/shadow-', '/etc/shadow.edit', '/var/backups/passwd.bak', '/var/backups/shadow.bak'],
22918
f83e31419f6e patch 8.2.2006: .pbtxt files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22834
diff changeset
395 \ 'pbtxt': ['file.pbtxt'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
396 \ 'pccts': ['file.g'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
397 \ 'pdf': ['file.pdf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
398 \ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
399 \ 'pf': ['pf.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
400 \ 'pfmain': ['main.cf'],
28365
da2f2f8fd66e patch 8.2.4708: PHP test files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28351
diff changeset
401 \ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt'],
13128
41b7a660ed2a patch 8.0.1438: filetype detection test not updated for change
Christian Brabandt <cb@256bit.org>
parents: 12688
diff changeset
402 \ 'lpc': ['file.lpc', 'file.ulpc'],
41b7a660ed2a patch 8.0.1438: filetype detection test not updated for change
Christian Brabandt <cb@256bit.org>
parents: 12688
diff changeset
403 \ 'pike': ['file.pike', 'file.pmod'],
41b7a660ed2a patch 8.0.1438: filetype detection test not updated for change
Christian Brabandt <cb@256bit.org>
parents: 12688
diff changeset
404 \ 'cmod': ['file.cmod'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
405 \ 'pilrc': ['file.rcp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
406 \ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
407 \ 'pinfo': ['/etc/pinforc', '/.pinforc', 'any/.pinforc', 'any/etc/pinforc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
408 \ 'pli': ['file.pli', 'file.pl1'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
409 \ 'plm': ['file.plm', 'file.p36', 'file.pac'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
410 \ 'plp': ['file.plp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
411 \ 'plsql': ['file.pls', 'file.plsql'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
412 \ 'po': ['file.po', 'file.pot'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
413 \ 'pod': ['file.pod'],
24099
209caadb403f patch 8.2.2591: Poke files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23962
diff changeset
414 \ 'poke': ['file.pk'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
415 \ 'postscr': ['file.ps', 'file.pfa', 'file.afm', 'file.eps', 'file.epsf', 'file.epsi', 'file.ai'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
416 \ 'pov': ['file.pov'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
417 \ 'povini': ['.povrayrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
418 \ 'ppd': ['file.ppd'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
419 \ 'ppwiz': ['file.it', 'file.ih'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
420 \ 'privoxy': ['file.action'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
421 \ 'prisma': ['file.prisma'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
422 \ 'proc': ['file.pc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
423 \ 'procmail': ['.procmail', '.procmailrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
424 \ 'prolog': ['file.pdb'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
425 \ 'promela': ['file.pml'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
426 \ 'proto': ['file.proto'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
427 \ 'protocols': ['/etc/protocols', 'any/etc/protocols'],
24299
201239ff51d7 patch 8.2.2690: PowerShell files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24168
diff changeset
428 \ 'ps1': ['file.ps1', 'file.psd1', 'file.psm1', 'file.pssc'],
201239ff51d7 patch 8.2.2690: PowerShell files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24168
diff changeset
429 \ 'ps1xml': ['file.ps1xml'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
430 \ 'psf': ['file.psf'],
24466
f5a6a6e98ec4 patch 8.2.2773: PSL filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24458
diff changeset
431 \ 'psl': ['file.psl'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
432 \ 'pug': ['file.pug'],
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
433 \ 'puppet': ['file.pp'],
25676
0385bd4411b7 patch 8.2.3374: Pyret files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25664
diff changeset
434 \ 'pyret': ['file.arr'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
435 \ 'pyrex': ['file.pyx', 'file.pxd'],
20863
69cd83562725 patch 8.2.0983: SConstruct file type not recognized
Bram Moolenaar <Bram@vim.org>
parents: 20857
diff changeset
436 \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
437 \ 'ql': ['file.ql', 'file.qll'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
438 \ 'quake': ['anybaseq2/file.cfg', 'anyid1/file.cfg', 'quake3/file.cfg', 'baseq2/file.cfg', 'id1/file.cfg', 'quake1/file.cfg', 'some-baseq2/file.cfg', 'some-id1/file.cfg', 'some-quake1/file.cfg'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
439 \ 'radiance': ['file.rad', 'file.mat'],
24496
706cfd8bcba6 patch 8.2.2788: Raku is now the only name what once was called perl6
Bram Moolenaar <Bram@vim.org>
parents: 24466
diff changeset
440 \ 'raku': ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
441 \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
23721
002fd1de0968 patch 8.2.2402: some filetypes not detected
Bram Moolenaar <Bram@vim.org>
parents: 23701
diff changeset
442 \ 'rbs': ['file.rbs'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
443 \ 'rc': ['file.rc', 'file.rch'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
444 \ 'rcs': ['file,v'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
445 \ 'readline': ['.inputrc', 'inputrc'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
446 \ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
18926
50355c55519f patch 8.2.0024: filetype Rego not recognized
Bram Moolenaar <Bram@vim.org>
parents: 18707
diff changeset
447 \ 'rego': ['file.rego'],
27653
52bbe3590f50 patch 8.2.4352: ReScript files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27559
diff changeset
448 \ 'rescript': ['file.res', 'file.resi'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
449 \ 'resolv': ['resolv.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
450 \ 'reva': ['file.frt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
451 \ 'rexx': ['file.rex', 'file.orx', 'file.rxo', 'file.rxj', 'file.jrexx', 'file.rexxj', 'file.rexx', 'file.testGroup', 'file.testUnit'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
452 \ 'rib': ['file.rib'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
453 \ 'rnc': ['file.rnc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
454 \ 'rng': ['file.rng'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
455 \ 'robots': ['robots.txt'],
26131
87d8f52d3821 patch 8.2.3598: RouterOS filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25971
diff changeset
456 \ 'routeros': ['file.rsc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
457 \ 'rpcgen': ['file.x'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
458 \ 'rpl': ['file.rpl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
459 \ 'rst': ['file.rst'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
460 \ 'rtf': ['file.rtf'],
28380
90d43a367955 patch 8.2.4715: Vagrantfile not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28377
diff changeset
461 \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile', 'Vagrantfile'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
462 \ 'rust': ['file.rs'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
463 \ 'samba': ['smb.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
464 \ 'sas': ['file.sas'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
465 \ 'sass': ['file.sass'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
466 \ 'sather': ['file.sa'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
467 \ 'sbt': ['file.sbt'],
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
468 \ 'scala': ['file.scala'],
26871
c8d32e12c934 patch 8.2.3964: some common lisp and scheme files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26761
diff changeset
469 \ 'scheme': ['file.scm', 'file.ss', 'file.sld', 'file.rkt', 'file.rktd', 'file.rktl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
470 \ 'scilab': ['file.sci', 'file.sce'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
471 \ 'screen': ['.screenrc', 'screenrc'],
23430
9e60204aea6e patch 8.2.2258: not all OCaml related files are detected
Bram Moolenaar <Bram@vim.org>
parents: 23316
diff changeset
472 \ 'sexplib': ['file.sexp'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
473 \ 'scss': ['file.scss'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
474 \ 'sd': ['file.sd'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
475 \ 'sdc': ['file.sdc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
476 \ 'sdl': ['file.sdl', 'file.pr'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
477 \ 'sed': ['file.sed'],
23962
436e702af70c patch 8.2.2523: Svelte filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23960
diff changeset
478 \ 'svelte': ['file.svelte'],
27096
d539c144aeb4 patch 8.2.4077: not all Libsensors files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 27070
diff changeset
479 \ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf', '/etc/sensors.d/file', 'any/etc/sensors.conf', 'any/etc/sensors3.conf', 'any/etc/sensors.d/file'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
480 \ 'services': ['/etc/services', 'any/etc/services'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
481 \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
24347
1df930301857 patch 8.2.2714: filetype pattern ending in star is too far up
Bram Moolenaar <Bram@vim.org>
parents: 24299
diff changeset
482 \ 'sh': ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
14946
8ca1dc213836 patch 8.1.0484: some file types are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 13182
diff changeset
483 \ 'sieve': ['file.siv', 'file.sieve'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
484 \ 'simula': ['file.sim'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
485 \ 'sinda': ['file.sin', 'file.s85'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
486 \ 'sisu': ['file.sst', 'file.ssm', 'file.ssi', 'file.-sst', 'file._sst', 'file.sst.meta', 'file.-sst.meta', 'file._sst.meta'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
487 \ 'skill': ['file.il', 'file.ils', 'file.cdf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
488 \ 'slang': ['file.sl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
489 \ 'slice': ['file.ice'],
27776
addcf70c8346 patch 8.2.4414: solidity files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27770
diff changeset
490 \ 'solidity': ['file.sol'],
26570
b1f4052d6c51 patch 8.2.3814: .csx files and .sln files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26552
diff changeset
491 \ 'solution': ['file.sln'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
492 \ 'slpconf': ['/etc/slp.conf', 'any/etc/slp.conf'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
493 \ 'slpreg': ['/etc/slp.reg', 'any/etc/slp.reg'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
494 \ 'slpspi': ['/etc/slp.spi', 'any/etc/slp.spi'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
495 \ 'slrnrc': ['.slrnrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
496 \ 'slrnsc': ['file.score'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
497 \ 'sm': ['sendmail.cf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
498 \ 'smarty': ['file.tpl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
499 \ 'smcl': ['file.hlp', 'file.ihlp', 'file.smcl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
500 \ 'smith': ['file.smt', 'file.smith'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
501 \ 'sml': ['file.sml'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
502 \ 'snobol4': ['file.sno', 'file.spt'],
23622
53cbcc2d2234 patch 8.2.2353: spartql files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 23584
diff changeset
503 \ 'sparql': ['file.rq', 'file.sparql'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
504 \ 'spec': ['file.spec'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
505 \ 'spice': ['file.sp', 'file.spice'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
506 \ 'spup': ['file.speedup', 'file.spdata', 'file.spd'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
507 \ 'spyce': ['file.spy', 'file.spi'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
508 \ 'sql': ['file.tyb', 'file.typ', 'file.tyc', 'file.pkb', 'file.pks'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
509 \ 'sqlj': ['file.sqlj'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
510 \ 'sqr': ['file.sqr', 'file.sqi'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
511 \ 'squid': ['squid.conf'],
26396
f4e6431ca146 patch 8.2.3729: no support for squirrels
Bram Moolenaar <Bram@vim.org>
parents: 26390
diff changeset
512 \ 'squirrel': ['file.nut'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
513 \ 'srec': ['file.s19', 'file.s28', 'file.s37', 'file.mot', 'file.srec'],
26933
959f943e6dd1 patch 8.2.3995: not all sshconfig files are detected as such
Bram Moolenaar <Bram@vim.org>
parents: 26871
diff changeset
514 \ 'sshconfig': ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf', 'any/.ssh/config', 'any/.ssh/file.conf'],
20749
dae1811e84dd patch 8.2.0927: some sshconfig and ssdhconfig files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 20639
diff changeset
515 \ 'sshdconfig': ['sshd_config', '/etc/ssh/sshd_config.d/file.conf', 'any/etc/ssh/sshd_config.d/file.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
516 \ 'st': ['file.st'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
517 \ 'stata': ['file.ado', 'file.do', 'file.imata', 'file.mata'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
518 \ 'stp': ['file.stp'],
26143
741cb243a7d2 patch 8.2.3604: not all sudoers files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 26141
diff changeset
519 \ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
520 \ 'supercollider': ['file.quark'],
28417
bca485676073 patch 8.2.4733: HEEx and Surface do need a separate filetype
Bram Moolenaar <Bram@vim.org>
parents: 28409
diff changeset
521 \ 'surface': ['file.sface'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
522 \ 'svg': ['file.svg'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
523 \ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
19164
bfe90421e223 patch 8.2.0141: no swift filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 18926
diff changeset
524 \ 'swift': ['file.swift'],
bfe90421e223 patch 8.2.0141: no swift filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 18926
diff changeset
525 \ 'swiftgyb': ['file.swift.gyb'],
bfe90421e223 patch 8.2.0141: no swift filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 18926
diff changeset
526 \ 'sil': ['file.sil'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
527 \ 'sysctl': ['/etc/sysctl.conf', '/etc/sysctl.d/file.conf', 'any/etc/sysctl.conf', 'any/etc/sysctl.d/file.conf'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
528 \ 'systemd': ['any/systemd/file.automount', 'any/systemd/file.dnssd', 'any/systemd/file.link', 'any/systemd/file.mount', 'any/systemd/file.netdev', 'any/systemd/file.network', 'any/systemd/file.nspawn', 'any/systemd/file.path', 'any/systemd/file.service', 'any/systemd/file.slice', 'any/systemd/file.socket', 'any/systemd/file.swap', 'any/systemd/file.target', 'any/systemd/file.timer', '/etc/systemd/some.conf.d/file.conf', '/etc/systemd/system/some.d/file.conf', '/etc/systemd/system/some.d/.#file', '/etc/systemd/system/.#otherfile', '/home/user/.config/systemd/user/some.d/mine.conf', '/home/user/.config/systemd/user/some.d/.#file', '/home/user/.config/systemd/user/.#otherfile', '/.config/systemd/user/.#', '/.config/systemd/user/.#-file', '/.config/systemd/user/file.d/.#', '/.config/systemd/user/file.d/.#-file', '/.config/systemd/user/file.d/file.conf', '/etc/systemd/file.conf.d/file.conf', '/etc/systemd/system/.#', '/etc/systemd/system/.#-file', '/etc/systemd/system/file.d/.#', '/etc/systemd/system/file.d/.#-file', '/etc/systemd/system/file.d/file.conf', '/systemd/file.automount', '/systemd/file.dnssd', '/systemd/file.link', '/systemd/file.mount', '/systemd/file.netdev', '/systemd/file.network', '/systemd/file.nspawn', '/systemd/file.path', '/systemd/file.service', '/systemd/file.slice', '/systemd/file.socket', '/systemd/file.swap', '/systemd/file.target', '/systemd/file.timer', 'any/.config/systemd/user/.#', 'any/.config/systemd/user/.#-file', 'any/.config/systemd/user/file.d/.#', 'any/.config/systemd/user/file.d/.#-file', 'any/.config/systemd/user/file.d/file.conf', 'any/etc/systemd/file.conf.d/file.conf', 'any/etc/systemd/system/.#', 'any/etc/systemd/system/.#-file', 'any/etc/systemd/system/file.d/.#', 'any/etc/systemd/system/file.d/.#-file', 'any/etc/systemd/system/file.d/file.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
529 \ 'systemverilog': ['file.sv', 'file.svh'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
530 \ 'tags': ['tags'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
531 \ 'tak': ['file.tak'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
532 \ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
533 \ 'taskedit': ['file.task'],
25878
f88641e6996c patch 8.2.3473: some files with tcl syntax are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25870
diff changeset
534 \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
535 \ 'teal': ['file.tl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
536 \ 'teraterm': ['file.ttl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
537 \ 'terminfo': ['file.ti'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
538 \ 'terraform': ['file.tfvars'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
539 \ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
540 \ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
541 \ 'texmf': ['texmf.cnf'],
26478
dd09291cf1ac patch 8.2.3769: zig files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26398
diff changeset
542 \ 'text': ['file.text', 'file.txt', 'README', 'LICENSE', 'COPYING', 'AUTHORS', '/usr/share/doc/bash-completion/AUTHORS', '/etc/apt/apt.conf.d/README', '/etc/Muttrc.d/README'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
543 \ 'tf': ['file.tf', '.tfrc', 'tfrc'],
22353
889143dbe2cd patch 8.2.1725: not all Pascal files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 22033
diff changeset
544 \ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
545 \ 'tilde': ['file.t.html'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
546 \ 'tla': ['file.tla'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
547 \ 'tli': ['file.tli'],
25935
c90b8e41b10e patch 8.2.3501: tmux filetype dection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 25915
diff changeset
548 \ 'tmux': ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf', 'tmux.conf.local'],
25971
217cd7833e8b patch 8.2.3519: TOML files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25935
diff changeset
549 \ 'toml': ['file.toml', 'Gopkg.lock', 'Pipfile', '/home/user/.cargo/config'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
550 \ 'tpp': ['file.tpp'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
551 \ 'treetop': ['file.treetop'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
552 \ 'trustees': ['trustees.conf'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
553 \ 'tsalt': ['file.slt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
554 \ 'tsscl': ['file.tsscl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
555 \ 'tssgm': ['file.tssgm'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
556 \ 'tssop': ['file.tssop'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
557 \ 'twig': ['file.twig'],
27796
8fdc92bdcff1 patch 8.2.4424: ".gts" and ".gjs" files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27776
diff changeset
558 \ 'typescript.glimmer': ['file.gts'],
17867
180fb9981255 patch 8.1.1930: cannot recognize .jsx and .tsx files
Bram Moolenaar <Bram@vim.org>
parents: 17555
diff changeset
559 \ 'typescriptreact': ['file.tsx'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
560 \ 'uc': ['file.uc'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
561 \ 'udevconf': ['/etc/udev/udev.conf', 'any/etc/udev/udev.conf'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
562 \ 'udevperm': ['/etc/udev/permissions.d/file.permissions', 'any/etc/udev/permissions.d/file.permissions'],
21849
18a341a4919c patch 8.2.1474: /usr/lib/udef/rules.d not recognized as udevrules
Bram Moolenaar <Bram@vim.org>
parents: 21817
diff changeset
563 \ 'udevrules': ['/etc/udev/rules.d/file.rules', '/usr/lib/udev/rules.d/file.rules', '/lib/udev/rules.d/file.rules'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
564 \ 'uil': ['file.uit', 'file.uil'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
565 \ 'updatedb': ['/etc/updatedb.conf', 'any/etc/updatedb.conf'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
566 \ 'upstart': ['/usr/share/upstart/file.conf', '/usr/share/upstart/file.override', '/etc/init/file.conf', '/etc/init/file.override', '/.init/file.conf', '/.init/file.override', '/.config/upstart/file.conf', '/.config/upstart/file.override', 'any/.config/upstart/file.conf', 'any/.config/upstart/file.override', 'any/.init/file.conf', 'any/.init/file.override', 'any/etc/init/file.conf', 'any/etc/init/file.override', 'any/usr/share/upstart/file.conf', 'any/usr/share/upstart/file.override'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
567 \ 'upstreamdat': ['upstream.dat', 'UPSTREAM.DAT', 'upstream.file.dat', 'UPSTREAM.FILE.DAT', 'file.upstream.dat', 'FILE.UPSTREAM.DAT'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
568 \ 'upstreaminstalllog': ['upstreaminstall.log', 'UPSTREAMINSTALL.LOG', 'upstreaminstall.file.log', 'UPSTREAMINSTALL.FILE.LOG', 'file.upstreaminstall.log', 'FILE.UPSTREAMINSTALL.LOG'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
569 \ 'upstreamlog': ['fdrupstream.log', 'upstream.log', 'UPSTREAM.LOG', 'upstream.file.log', 'UPSTREAM.FILE.LOG', 'file.upstream.log', 'FILE.UPSTREAM.LOG', 'UPSTREAM-file.log', 'UPSTREAM-FILE.LOG'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
570 \ 'usserverlog': ['usserver.log', 'USSERVER.LOG', 'usserver.file.log', 'USSERVER.FILE.LOG', 'file.usserver.log', 'FILE.USSERVER.LOG'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
571 \ 'usw2kagtlog': ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
572 \ 'vb': ['file.sba', 'file.vb', 'file.vbs', 'file.dsm', 'file.ctl'],
27445
31b0d8898489 patch 8.2.4251: vala files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27420
diff changeset
573 \ 'vala': ['file.vala'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
574 \ 'vera': ['file.vr', 'file.vri', 'file.vrh'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
575 \ 'verilog': ['file.v'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
576 \ 'verilogams': ['file.va', 'file.vams'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
577 \ 'vgrindefs': ['vgrindefs'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
578 \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
579 \ 'vim': ['file.vim', 'file.vba', '.exrc', '_exrc', 'some-vimrc', 'some-vimrc-file', 'vimrc', 'vimrc-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
580 \ 'viminfo': ['.viminfo', '_viminfo'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
581 \ 'vmasm': ['file.mar'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
582 \ 'voscm': ['file.cm'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
583 \ 'vrml': ['file.wrl'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
584 \ 'vroom': ['file.vroom'],
17526
ae379e753465 patch 8.1.1761: filetype "vuejs" causes problems for some users
Bram Moolenaar <Bram@vim.org>
parents: 17188
diff changeset
585 \ 'vue': ['file.vue'],
14946
8ca1dc213836 patch 8.1.0484: some file types are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 13182
diff changeset
586 \ 'wast': ['file.wast', 'file.wat'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
587 \ 'webmacro': ['file.wm'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
588 \ 'wget': ['.wgetrc', 'wgetrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
589 \ 'winbatch': ['file.wbt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
590 \ 'wml': ['file.wml'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
591 \ 'wsh': ['file.wsf', 'file.wsc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
592 \ 'wsml': ['file.wsml'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
593 \ 'wvdial': ['wvdial.conf', '.wvdialrc'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
594 \ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
595 \ 'xhtml': ['file.xhtml', 'file.xht'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
596 \ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
597 \ 'xmath': ['file.msc', 'file.msf'],
26309
270ac1efc93b patch 8.2.3685: Visual studio project files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26296
diff changeset
598 \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.fsproj', 'file.fsproj.user', 'file.vbproj', 'file.vbproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1', 'file.mpd'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
599 \ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
600 \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
25915
36f2c43bd671 patch 8.2.3491: xpm2 filetype dection is not so good
Bram Moolenaar <Bram@vim.org>
parents: 25878
diff changeset
601 \ 'xpm': ['file.xpm'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
602 \ 'xpm2': ['file.xpm2'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
603 \ 'xquery': ['file.xq', 'file.xql', 'file.xqm', 'file.xquery', 'file.xqy'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
604 \ 'xs': ['file.xs'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
605 \ 'xsd': ['file.xsd'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
606 \ 'xslt': ['file.xsl', 'file.xslt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
607 \ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
608 \ 'yaml': ['file.yaml', 'file.yml'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
609 \ 'yang': ['file.yang'],
14991
ebabd6fe3833 patch 8.1.0507: .raml files not properly detected
Bram Moolenaar <Bram@vim.org>
parents: 14974
diff changeset
610 \ 'raml': ['file.raml'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
611 \ 'z8a': ['file.z8a'],
26478
dd09291cf1ac patch 8.2.3769: zig files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26398
diff changeset
612 \ 'zig': ['file.zig'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
613 \ 'zimbu': ['file.zu'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
614 \ 'zimbutempl': ['file.zut'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
615 \ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
616 \
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
617 \ 'help': [$VIMRUNTIME . '/doc/help.txt'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
618 \ }
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
619
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
620 let s:filename_case_checks = {
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
621 \ 'modula2': ['file.DEF'],
22033
cdf95988615a patch 8.2.1566: not all Bazel files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 21849
diff changeset
622 \ 'bzl': ['file.BUILD', 'BUILD'],
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
623 \ }
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
624
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
625 func CheckItems(checks)
22673
67aa7507ea2e patch 8.2.1885: filetype tests unnessarily creates swap files
Bram Moolenaar <Bram@vim.org>
parents: 22557
diff changeset
626 set noswapfile
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
627 for [ft, names] in items(a:checks)
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
628 for i in range(0, len(names) - 1)
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
629 new
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
630 try
17528
62a6d99082f7 patch 8.1.1762: some filetype rules are in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 17526
diff changeset
631 exe 'edit ' . fnameescape(names[i])
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
632 catch
17555
c2eb5118ba89 patch 8.1.1775: error message may be empty in filetype test
Bram Moolenaar <Bram@vim.org>
parents: 17528
diff changeset
633 call assert_report('cannot edit "' . names[i] . '": ' . v:exception)
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
634 endtry
16920
8d91579414b8 patch 8.1.1461: tests do not run or are not reliable on some systems
Bram Moolenaar <Bram@vim.org>
parents: 16562
diff changeset
635 if &filetype == '' && &readonly
8d91579414b8 patch 8.1.1461: tests do not run or are not reliable on some systems
Bram Moolenaar <Bram@vim.org>
parents: 16562
diff changeset
636 " File exists but not able to edit it (permission denied)
8d91579414b8 patch 8.1.1461: tests do not run or are not reliable on some systems
Bram Moolenaar <Bram@vim.org>
parents: 16562
diff changeset
637 else
8d91579414b8 patch 8.1.1461: tests do not run or are not reliable on some systems
Bram Moolenaar <Bram@vim.org>
parents: 16562
diff changeset
638 call assert_equal(ft, &filetype, 'with file name: ' . names[i])
8d91579414b8 patch 8.1.1461: tests do not run or are not reliable on some systems
Bram Moolenaar <Bram@vim.org>
parents: 16562
diff changeset
639 endif
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
640 bwipe!
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
641 endfor
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
642 endfor
22673
67aa7507ea2e patch 8.2.1885: filetype tests unnessarily creates swap files
Bram Moolenaar <Bram@vim.org>
parents: 22557
diff changeset
643 set swapfile&
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
644 endfunc
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
645
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
646 func Test_filetype_detection()
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
647 filetype on
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
648 call CheckItems(s:filename_checks)
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
649 if has('fname_case')
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
650 call CheckItems(s:filename_case_checks)
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
651 endif
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
652 filetype off
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
653 endfunc
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
654
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
655 " Filetypes detected from the file contents by scripts.vim
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
656 let s:script_checks = {
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
657 \ 'virata': [['% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
658 \ ['', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
659 \ ['', '', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
660 \ ['', '', '', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
661 \ ['', '', '', '', '% Virata']],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
662 \ 'strace': [['execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
663 \ ['15:17:47 execve("/usr/bin/pstree", ["pstree"], ... "_=/usr/bin/strace"]) = 0'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
664 \ ['__libc_start_main and something']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
665 \ 'clojure': [['#!/path/clojure']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
666 \ 'scala': [['#!/path/scala']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
667 \ 'tcsh': [['#!/path/tcsh']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
668 \ 'zsh': [['#!/path/zsh']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
669 \ 'tcl': [['#!/path/tclsh'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
670 \ ['#!/path/wish'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
671 \ ['#!/path/expectk'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
672 \ ['#!/path/itclsh'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
673 \ ['#!/path/itkwish']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
674 \ 'expect': [['#!/path/expect']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
675 \ 'gnuplot': [['#!/path/gnuplot']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
676 \ 'make': [['#!/path/make']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
677 \ 'pike': [['#!/path/pike'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
678 \ ['#!/path/pike0'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
679 \ ['#!/path/pike9']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
680 \ 'lua': [['#!/path/lua']],
24496
706cfd8bcba6 patch 8.2.2788: Raku is now the only name what once was called perl6
Bram Moolenaar <Bram@vim.org>
parents: 24466
diff changeset
681 \ 'raku': [['#!/path/raku']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
682 \ 'perl': [['#!/path/perl']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
683 \ 'php': [['#!/path/php']],
13182
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
684 \ 'python': [['#!/path/python'],
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
685 \ ['#!/path/python2'],
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
686 \ ['#!/path/python3']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
687 \ 'groovy': [['#!/path/groovy']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
688 \ 'ruby': [['#!/path/ruby']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
689 \ 'javascript': [['#!/path/node'],
13182
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
690 \ ['#!/path/js'],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
691 \ ['#!/path/nodejs'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
692 \ ['#!/path/rhino']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
693 \ 'bc': [['#!/path/bc']],
27132
0b5ce27d8b68 patch 8.2.4095: sed script not recognized by the first line
Bram Moolenaar <Bram@vim.org>
parents: 27096
diff changeset
694 \ 'sed': [['#!/path/sed'], ['#n'], ['#n comment']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
695 \ 'ocaml': [['#!/path/ocaml']],
21817
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
696 \ 'awk': [['#!/path/awk'],
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
697 \ ['#!/path/gawk']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
698 \ 'wml': [['#!/path/wml']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
699 \ 'scheme': [['#!/path/scheme']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
700 \ 'cfengine': [['#!/path/cfengine']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
701 \ 'erlang': [['#!/path/escript']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
702 \ 'haskell': [['#!/path/haskell']],
17188
93cb37b45636 patch 8.1.1593: filetype not detected for C++ header files without extension
Bram Moolenaar <Bram@vim.org>
parents: 16920
diff changeset
703 \ 'cpp': [['// Standard iostream objects -*- C++ -*-'],
93cb37b45636 patch 8.1.1593: filetype not detected for C++ header files without extension
Bram Moolenaar <Bram@vim.org>
parents: 16920
diff changeset
704 \ ['// -*- C++ -*-']],
19607
d24e6844aabd patch 8.2.0360: yaml files are only recognized by the file extension
Bram Moolenaar <Bram@vim.org>
parents: 19471
diff changeset
705 \ 'yaml': [['%YAML 1.2']],
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
706 \ 'pascal': [['#!/path/instantfpc']],
23701
c5b5e7520fe2 patch 8.2.2392: fennel filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23685
diff changeset
707 \ 'fennel': [['#!/path/fennel']],
26131
87d8f52d3821 patch 8.2.3598: RouterOS filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25971
diff changeset
708 \ 'routeros': [['#!/path/rsc']],
26141
77ad8ea01c00 patch 8.2.3603: fish filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26133
diff changeset
709 \ 'fish': [['#!/path/fish']],
26311
ce3678583211 patch 8.2.3686: filetype detection often mixes up Forth and F#
Bram Moolenaar <Bram@vim.org>
parents: 26309
diff changeset
710 \ 'forth': [['#!/path/gforth']],
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
711 \ }
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
712
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
713 " Various forms of "env" optional arguments.
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
714 let s:script_env_checks = {
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
715 \ 'perl': [['#!/usr/bin/env VAR=val perl']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
716 \ 'scala': [['#!/usr/bin/env VAR=val VVAR=vval scala']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
717 \ 'awk': [['#!/usr/bin/env VAR=val -i awk']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
718 \ 'scheme': [['#!/usr/bin/env VAR=val --ignore-environment scheme']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
719 \ 'python': [['#!/usr/bin/env VAR=val -S python -w -T']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
720 \ 'wml': [['#!/usr/bin/env VAR=val --split-string wml']],
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
721 \ }
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
722
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
723 func Run_script_detection(test_dict)
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
724 filetype on
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
725 for [ft, files] in items(a:test_dict)
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
726 for file in files
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
727 call writefile(file, 'Xtest')
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
728 split Xtest
12688
a6a935b3270e patch 8.0.1222: test functions interfere with each other
Christian Brabandt <cb@256bit.org>
parents: 12255
diff changeset
729 call assert_equal(ft, &filetype, 'for text: ' . string(file))
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
730 bwipe!
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
731 endfor
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
732 endfor
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
733 call delete('Xtest')
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
734 filetype off
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
735 endfunc
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
736
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
737 func Test_script_detection()
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
738 call Run_script_detection(s:script_checks)
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
739 call Run_script_detection(s:script_env_checks)
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
740 endfunc
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
741
15097
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14991
diff changeset
742 func Test_setfiletype_completion()
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14991
diff changeset
743 call feedkeys(":setfiletype java\<C-A>\<C-B>\"\<CR>", 'tx')
17867
180fb9981255 patch 8.1.1930: cannot recognize .jsx and .tsx files
Bram Moolenaar <Bram@vim.org>
parents: 17555
diff changeset
744 call assert_equal('"setfiletype java javacc javascript javascriptreact', @:)
15097
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14991
diff changeset
745 endfunc
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
746
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
747 " Test for ':filetype detect' command for a buffer without a file
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
748 func Test_emptybuf_ftdetect()
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
749 new
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
750 call setline(1, '#!/bin/sh')
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
751 call assert_equal('', &filetype)
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
752 filetype detect
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
753 call assert_equal('sh', &filetype)
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
754 close!
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
755 endfunc
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
756
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
757 " Test for ':filetype indent on' and ':filetype indent off' commands
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
758 func Test_filetype_indent_off()
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
759 new Xtest.vim
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
760 filetype indent on
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
761 call assert_equal(1, g:did_indent_on)
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
762 call assert_equal(['filetype detection:ON plugin:OFF indent:ON'],
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
763 \ execute('filetype')->split("\n"))
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
764 filetype indent off
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
765 call assert_equal(0, exists('g:did_indent_on'))
19471
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
766 call assert_equal(['filetype detection:ON plugin:OFF indent:OFF'],
cb73f4ae6b7c patch 8.2.0293: various Ex commands not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 19425
diff changeset
767 \ execute('filetype')->split("\n"))
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
768 close
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
769 endfunc
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
770
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
771 """""""""""""""""""""""""""""""""""""""""""""""""
28483
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
772 " Tests for specific extensions and filetypes.
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
773 " Keep sorted.
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
774 """""""""""""""""""""""""""""""""""""""""""""""""
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
775
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
776 func Test_bas_file()
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
777 filetype on
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
778
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
779 call writefile(['looks like BASIC'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
780 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
781 call assert_equal('basic', &filetype)
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
782 bwipe!
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
783
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
784 " Test dist#ft#FTbas()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
785
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
786 let g:filetype_bas = 'freebasic'
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
787 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
788 call assert_equal('freebasic', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
789 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
790 unlet g:filetype_bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
791
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
792 " FreeBASIC
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
793
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
794 call writefile(["/' FreeBASIC multiline comment '/"], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
795 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
796 call assert_equal('freebasic', &filetype)
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
797 bwipe!
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
798
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
799 call writefile(['#define TESTING'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
800 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
801 call assert_equal('freebasic', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
802 bwipe!
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
803
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
804 call writefile(['option byval'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
805 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
806 call assert_equal('freebasic', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
807 bwipe!
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
808
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
809 call writefile(['extern "C"'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
810 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
811 call assert_equal('freebasic', &filetype)
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
812 bwipe!
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
813
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
814 " QB64
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
815
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
816 call writefile(['$LET TESTING = 1'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
817 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
818 call assert_equal('qb64', &filetype)
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
819 bwipe!
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
820
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
821 call writefile(['OPTION _EXPLICIT'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
822 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
823 call assert_equal('qb64', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
824 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
825
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
826 " Visual Basic
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
827
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
828 call writefile(['Attribute VB_NAME = "Testing"'], 'Xfile.bas')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
829 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
830 call assert_equal('vb', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
831 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
832
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
833 call delete('Xfile.bas')
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
834 filetype off
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
835 endfunc
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
836
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
837 " Test dist#ft#FTcfg()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
838 func Test_cfg_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
839 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
840
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
841 " *.cfg defaults to cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
842 call writefile(['looks like cfg'], 'cfgfile.cfg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
843 split cfgfile.cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
844 call assert_equal('cfg', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
845
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
846 let g:filetype_cfg = 'other'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
847 edit
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
848 call assert_equal('other', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
849 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
850 unlet g:filetype_cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
851
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
852 " RAPID cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
853 let ext = 'cfg'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
854 for i in ['EIO', 'MMC', 'MOC', 'PROC', 'SIO', 'SYS']
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
855 call writefile([i .. ':CFG'], 'cfgfile.' .. ext)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
856 execute "split cfgfile." .. ext
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
857 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
858 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
859 call delete('cfgfile.' .. ext)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
860 " check different case of file extension
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
861 let ext = substitute(ext, '\(\l\)', '\u\1', '')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
862 endfor
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
863
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
864 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
865 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
866
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
867 func Test_d_file()
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
868 filetype on
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
869
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
870 call writefile(['looks like D'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
871 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
872 call assert_equal('d', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
873 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
874
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
875 call writefile(['#!/some/bin/dtrace'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
876 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
877 call assert_equal('dtrace', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
878 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
879
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
880 call writefile(['#pragma D option'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
881 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
882 call assert_equal('dtrace', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
883 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
884
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
885 call writefile([':some:thing:'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
886 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
887 call assert_equal('dtrace', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
888 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
889
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
890 call writefile(['module this', '#pragma D option'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
891 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
892 call assert_equal('d', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
893 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
894
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
895 call writefile(['import that', '#pragma D option'], 'Xfile.d')
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
896 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
897 call assert_equal('d', &filetype)
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
898 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
899
27883
9c04fbcaacbc patch 8.2.4467: running filetype test leaves file behind
Bram Moolenaar <Bram@vim.org>
parents: 27881
diff changeset
900 " clean up
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
901 filetype off
27881
e3014ada45a5 patch 8.2.4466: MS-Windows: illegal memory access in installer
Bram Moolenaar <Bram@vim.org>
parents: 27877
diff changeset
902 call delete('Xfile.d')
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
903 endfunc
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
904
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
905 func Test_dat_file()
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
906 filetype on
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
907
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
908 " KRL header start with "&WORD", but is not always present.
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
909 call writefile(['&ACCESS'], 'datfile.dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
910 split datfile.dat
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
911 call assert_equal('krl', &filetype)
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
912 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
913 call delete('datfile.dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
914
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
915 " KRL defdat with leading spaces, for KRL file extension is not case
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
916 " sensitive.
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
917 call writefile([' DEFDAT datfile'], 'datfile.Dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
918 split datfile.Dat
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
919 call assert_equal('krl', &filetype)
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
920 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
921 call delete('datfile.Dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
922
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
923 " KRL defdat with embedded spaces, file starts with empty line(s).
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
924 call writefile(['', 'defdat datfile public'], 'datfile.DAT')
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
925 split datfile.DAT
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
926 call assert_equal('krl', &filetype)
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
927 bwipe!
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
928
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
929 " User may overrule file inspection
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
930 let g:filetype_dat = 'dat'
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
931 split datfile.DAT
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
932 call assert_equal('dat', &filetype)
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
933 bwipe!
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
934 call delete('datfile.DAT')
28417
bca485676073 patch 8.2.4733: HEEx and Surface do need a separate filetype
Bram Moolenaar <Bram@vim.org>
parents: 28409
diff changeset
935 unlet g:filetype_dat
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
936
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
937 filetype off
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
938 endfunc
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
939
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
940 func Test_dep3patch_file()
23078
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
941 filetype on
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
942
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
943 call assert_true(mkdir('debian/patches', 'p'))
23078
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
944
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
945 " series files are not patches
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
946 call writefile(['Description: some awesome patch'], 'debian/patches/series')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
947 split debian/patches/series
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
948 call assert_notequal('dep3patch', &filetype)
23078
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
949 bwipe!
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
950
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
951 " diff/patch files without the right headers should still show up as ft=diff
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
952 call writefile([], 'debian/patches/foo.diff')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
953 split debian/patches/foo.diff
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
954 call assert_equal('diff', &filetype)
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
955 bwipe!
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
956
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
957 " Files with the right headers are detected as dep3patch, even if they don't
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
958 " have a diff/patch extension
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
959 call writefile(['Subject: dep3patches'], 'debian/patches/bar')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
960 split debian/patches/bar
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
961 call assert_equal('dep3patch', &filetype)
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
962 bwipe!
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
963
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
964 " Files in sub-directories are detected
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
965 call assert_true(mkdir('debian/patches/s390x', 'p'))
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
966 call writefile(['Subject: dep3patches'], 'debian/patches/s390x/bar')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
967 split debian/patches/s390x/bar
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
968 call assert_equal('dep3patch', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
969 bwipe!
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
970
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
971 " The detection stops when seeing the "header end" marker
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
972 call writefile(['---', 'Origin: the cloud'], 'debian/patches/baz')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
973 split debian/patches/baz
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
974 call assert_notequal('dep3patch', &filetype)
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
975 bwipe!
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
976
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
977 call delete('debian', 'rf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
978 endfunc
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
979
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
980 func Test_dsl_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
981 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
982
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
983 call writefile([' <!doctype dsssl-spec ['], 'dslfile.dsl')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
984 split dslfile.dsl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
985 call assert_equal('dsl', &filetype)
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
986 bwipe!
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
987
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
988 call writefile(['workspace {'], 'dslfile.dsl')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
989 split dslfile.dsl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
990 call assert_equal('structurizr', &filetype)
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
991 bwipe!
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
992
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
993 call delete('dslfile.dsl')
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
994 filetype off
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
995 endfunc
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
996
25026
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
997 func Test_ex_file()
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
998 filetype on
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
999
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1000 call writefile(['arbitrary content'], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1001 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1002 call assert_equal('elixir', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1003 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1004 let g:filetype_euphoria = 'euphoria4'
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1005 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1006 call assert_equal('euphoria4', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1007 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1008 unlet g:filetype_euphoria
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1009
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1010 call writefile(['-- filetype euphoria comment'], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1011 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1012 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1013 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1014
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1015 call writefile(['--filetype euphoria comment'], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1016 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1017 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1018 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1019
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1020 call writefile(['ifdef '], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1021 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1022 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1023 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1024
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1025 call writefile(['include '], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1026 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1027 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1028 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1029
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1030 call delete('Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1031 filetype off
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1032 endfunc
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
1033
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1034 func Test_foam_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1035 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1036 call assert_true(mkdir('0', 'p'))
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1037 call assert_true(mkdir('0.orig', 'p'))
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1038
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1039 call writefile(['FoamFile {', ' object something;'], 'Xfile1Dict')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1040 split Xfile1Dict
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1041 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1042 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1043
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1044 call writefile(['FoamFile {', ' object something;'], 'Xfile1Dict.something')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1045 split Xfile1Dict.something
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1046 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1047 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1048
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1049 call writefile(['FoamFile {', ' object something;'], 'XfileProperties')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1050 split XfileProperties
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1051 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1052 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1053
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1054 call writefile(['FoamFile {', ' object something;'], 'XfileProperties.something')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1055 split XfileProperties.something
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1056 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1057 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1058
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1059 call writefile(['FoamFile {', ' object something;'], 'XfileProperties')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1060 split XfileProperties
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1061 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1062 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1063
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1064 call writefile(['FoamFile {', ' object something;'], 'XfileProperties.something')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1065 split XfileProperties.something
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1066 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1067 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1068
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1069 call writefile(['FoamFile {', ' object something;'], '0/Xfile')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1070 split 0/Xfile
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1071 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1072 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1073
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1074 call writefile(['FoamFile {', ' object something;'], '0.orig/Xfile')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1075 split 0.orig/Xfile
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1076 call assert_equal('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1077 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1078
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1079 call delete('0', 'rf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1080 call delete('0.orig', 'rf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1081 call delete('Xfile1Dict')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1082 call delete('Xfile1Dict.something')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1083 call delete('XfileProperties')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1084 call delete('XfileProperties.something')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1085 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1086 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1087
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1088 func Test_frm_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1089 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1090
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1091 call writefile(['looks like FORM'], 'Xfile.frm')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1092 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1093 call assert_equal('form', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1094 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1095
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1096 " Test dist#ft#FTfrm()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1097
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1098 let g:filetype_frm = 'form'
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1099 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1100 call assert_equal('form', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1101 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1102 unlet g:filetype_frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1103
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1104 " Visual Basic
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1105
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1106 call writefile(['Begin VB.Form Form1'], 'Xfile.frm')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1107 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1108 call assert_equal('vb', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1109 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1110
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1111 call delete('Xfile.frm')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1112 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1113 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1114
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1115 func Test_fs_file()
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1116 filetype on
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1117
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1118 call writefile(['looks like F#'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1119 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1120 call assert_equal('fsharp', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1121 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1122
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1123 let g:filetype_fs = 'forth'
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1124 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1125 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1126 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1127 unlet g:filetype_fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1128
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1129 " Test dist#ft#FTfs()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1130
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1131 " Forth (Gforth)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1132
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1133 call writefile(['( Forth inline comment )'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1134 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1135 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1136 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1137
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1138 call writefile(['.( Forth displayed inline comment )'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1139 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1140 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1141 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1142
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1143 call writefile(['\ Forth line comment'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1144 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1145 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1146 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1147
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1148 " empty line comment - no space required
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1149 call writefile(['\'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1150 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1151 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1152 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1153
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1154 call writefile(['\G Forth documentation comment '], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1155 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1156 call assert_equal('forth', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1157 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1158
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1159 call writefile([': squared ( n -- n^2 )', 'dup * ;'], 'Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1160 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1161 call assert_equal('forth', &filetype)
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1162 bwipe!
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1163
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1164 call delete('Xfile.fs')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1165 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1166 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1167
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1168 func Test_git_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1169 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1170
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1171 call assert_true(mkdir('Xrepo.git', 'p'))
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1172
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1173 call writefile([], 'Xrepo.git/HEAD')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1174 split Xrepo.git/HEAD
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1175 call assert_equal('', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1176 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1177
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1178 call writefile(['0000000000000000000000000000000000000000'], 'Xrepo.git/HEAD')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1179 split Xrepo.git/HEAD
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1180 call assert_equal('git', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1181 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1182
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1183 call writefile(['0000000000000000000000000000000000000000000000000000000000000000'], 'Xrepo.git/HEAD')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1184 split Xrepo.git/HEAD
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1185 call assert_equal('git', &filetype)
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1186 bwipe!
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1187
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1188 call writefile(['ref: refs/heads/master'], 'Xrepo.git/HEAD')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1189 split Xrepo.git/HEAD
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1190 call assert_equal('git', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1191 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1192
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1193 call delete('Xrepo.git', 'rf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1194 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1195 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1196
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1197 func Test_hook_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1198 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1199
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1200 call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1201 split Xfile.hook
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
1202 call assert_equal('conf', &filetype)
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1203 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1204
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1205 call writefile(['not pacman'], 'Xfile.hook')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1206 split Xfile.hook
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
1207 call assert_notequal('conf', &filetype)
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1208 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1209
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1210 call delete('Xfile.hook')
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1211 filetype off
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1212 endfunc
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1213
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1214 func Test_m_file()
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1215 filetype on
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1216
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1217 call writefile(['looks like Matlab'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1218 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1219 call assert_equal('matlab', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1220 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1221
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1222 let g:filetype_m = 'octave'
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1223 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1224 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1225 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1226 unlet g:filetype_m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1227
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1228 " Test dist#ft#FTm()
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1229
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1230 " Objective-C
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1231
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1232 call writefile(['// Objective-C line comment'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1233 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1234 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1235 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1236
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1237 call writefile(['/* Objective-C block comment */'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1238 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1239 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1240 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1241
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1242 call writefile(['#import "test.m"'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1243 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1244 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1245 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1246
26296
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1247 call writefile(['#include <header.h>'], 'Xfile.m')
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1248 split Xfile.m
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1249 call assert_equal('objc', &filetype)
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1250 bwipe!
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1251
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1252 call writefile(['#define FORTY_TWO'], 'Xfile.m')
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1253 split Xfile.m
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1254 call assert_equal('objc', &filetype)
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1255 bwipe!
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1256
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1257 " Octave
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1258
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1259 call writefile(['# Octave line comment'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1260 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1261 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1262 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1263
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1264 call writefile(['%!test "Octave test"'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1265 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1266 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1267 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1268
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1269 call writefile(['unwind_protect'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1270 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1271 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1272 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1273
25794
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1274 call writefile(['try; 42; end_try_catch'], 'Xfile.m')
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1275 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1276 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1277 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1278
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1279 " Mathematica
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1280
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1281 call writefile(['(* Mathematica comment'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1282 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1283 call assert_equal('mma', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1284 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1285
25794
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1286 " MATLAB
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1287
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1288 call writefile(['% MATLAB line comment'], 'Xfile.m')
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1289 split Xfile.m
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1290 call assert_equal('matlab', &filetype)
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1291 bwipe!
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1292
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1293 " Murphi
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1294
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1295 call writefile(['-- Murphi comment'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1296 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1297 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1298 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1299
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1300 call writefile(['/* Murphi block comment */', 'Type'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1301 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1302 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1303 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1304
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1305 call writefile(['Type'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1306 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1307 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1308 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1309
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1310 call delete('Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1311 filetype off
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1312 endfunc
25915
36f2c43bd671 patch 8.2.3491: xpm2 filetype dection is not so good
Bram Moolenaar <Bram@vim.org>
parents: 25878
diff changeset
1313
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1314 func Test_mod_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1315 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1316
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1317 " *.mod defaults to Modsim III
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1318 call writefile(['locks like Modsim III'], 'modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1319 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1320 call assert_equal('modsim3', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1321 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1322
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1323 " Users preference set by g:filetype_mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1324 let g:filetype_mod = 'lprolog'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1325 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1326 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1327 unlet g:filetype_mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1328 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1329
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1330 " RAPID header start with a line containing only "%%%",
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1331 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1332 call writefile(['%%%'], 'modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1333 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1334 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1335 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1336 call delete('modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1337
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1338 " RAPID supports umlauts in module names, leading spaces,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1339 " the .mod extension is not case sensitive.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1340 call writefile([' module ÃœmlautModule'], 'modfile.Mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1341 split modfile.Mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1342 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1343 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1344 call delete('modfile.Mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1345
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1346 " RAPID is not case sensitive, embedded spaces, sysmodule,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1347 " file starts with empty line(s).
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1348 call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'modfile.MOD')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1349 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1350 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1351 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1352
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1353 " Modula-2 MODULE not start of line
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1354 call writefile(['IMPLEMENTATION MODULE Module2Mod;'], 'modfile.MOD')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1355 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1356 call assert_equal('modula2', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1357 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1358
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1359 " Modula-2 with comment and empty lines prior MODULE
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1360 call writefile(['', '(* with', ' comment *)', '', 'MODULE Module2Mod;'], 'modfile.MOD')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1361 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1362 call assert_equal('modula2', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1363 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1364 call delete('modfile.MOD')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1365
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1366 " LambdaProlog module
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1367 call writefile(['module lpromod.'], 'modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1368 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1369 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1370 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1371
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1372 " LambdaProlog with comment and empty lines prior module
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1373 call writefile(['', '% with', '% comment', '', 'module lpromod.'], 'modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1374 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1375 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1376 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1377 call delete('modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1378
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1379 " go.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1380 call writefile(['module example.com/M'], 'go.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1381 split go.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1382 call assert_equal('gomod', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1383 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1384 call delete('go.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1385
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1386 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1387 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1388
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1389 func Test_patch_file()
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1390 filetype on
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1391
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1392 call writefile([], 'Xfile.patch')
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1393 split Xfile.patch
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1394 call assert_equal('diff', &filetype)
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1395 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1396
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1397 call writefile(['From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001'], 'Xfile.patch')
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1398 split Xfile.patch
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1399 call assert_equal('gitsendemail', &filetype)
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1400 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1401
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1402 call writefile(['From 0000000000000000000000000000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001'], 'Xfile.patch')
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1403 split Xfile.patch
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1404 call assert_equal('gitsendemail', &filetype)
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1405 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1406
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1407 call delete('Xfile.patch')
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1408 filetype off
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1409 endfunc
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1410
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1411 func Test_perl_file()
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1412 filetype on
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1413
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1414 " only tests one case, should do more
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1415 let lines =<< trim END
27070
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1416
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1417 use a
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1418 END
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1419 call writefile(lines, "Xfile.t")
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1420 split Xfile.t
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1421 call assert_equal('perl', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1422 bwipe
27070
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1423
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1424 call delete('Xfile.t')
27070
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1425 filetype off
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1426 endfunc
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1427
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1428 func Test_pp_file()
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1429 filetype on
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1430
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1431 call writefile(['looks like puppet'], 'Xfile.pp')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1432 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1433 call assert_equal('puppet', &filetype)
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1434 bwipe!
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1435
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1436 let g:filetype_pp = 'pascal'
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1437 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1438 call assert_equal('pascal', &filetype)
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1439 bwipe!
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1440 unlet g:filetype_pp
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1441
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1442 " Test dist#ft#FTpp()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1443 call writefile(['{ pascal comment'], 'Xfile.pp')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1444 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1445 call assert_equal('pascal', &filetype)
27287
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1446 bwipe!
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1447
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1448 call writefile(['procedure pascal'], 'Xfile.pp')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1449 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1450 call assert_equal('pascal', &filetype)
27493
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1451 bwipe!
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1452
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1453 call delete('Xfile.pp')
27493
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1454 filetype off
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1455 endfunc
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1456
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1457 " Test dist#ft#FTprg()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1458 func Test_prg_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1459 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1460
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1461 " *.prg defaults to clipper
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1462 call writefile(['looks like clipper'], 'prgfile.prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1463 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1464 call assert_equal('clipper', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1465 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1466
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1467 " Users preference set by g:filetype_prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1468 let g:filetype_prg = 'eviews'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1469 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1470 call assert_equal('eviews', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1471 unlet g:filetype_prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1472 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1473
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1474 " RAPID header start with a line containing only "%%%",
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1475 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1476 call writefile(['%%%'], 'prgfile.prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1477 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1478 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1479 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1480 call delete('prgfile.prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1481
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1482 " RAPID supports umlauts in module names, leading spaces,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1483 " the .prg extension is not case sensitive.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1484 call writefile([' module ÃœmlautModule'], 'prgfile.Prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1485 split prgfile.Prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1486 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1487 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1488 call delete('prgfile.Prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1489
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1490 " RAPID is not case sensitive, embedded spaces, sysmodule,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1491 " file starts with empty line(s).
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1492 call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'prgfile.PRG')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1493 split prgfile.PRG
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1494 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1495 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1496 call delete('prgfile.PRG')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1497
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1498 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1499 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1500
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1501 " Test dist#ft#FTsc()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1502 func Test_sc_file()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1503 filetype on
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1504
28445
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1505 " SC file methods are defined 'Class : Method'
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1506 call writefile(['SCNvimDocRenderer : SCDocHTMLRenderer {'], 'srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1507 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1508 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1509 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1510 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1511
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1512 " SC classes are defined with '+ Class {}'
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1513 call writefile(['+ SCNvim {', '*methodArgs {|method|'], 'srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1514 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1515 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1516 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1517 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1518
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1519 " Some SC class files start with comment and define methods many lines later
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1520 call writefile(['// Query', '//Method','^this {'], 'srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1521 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1522 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1523 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1524 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1525
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1526 " Some SC class files put comments between method declaration after class
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1527 call writefile(['PingPong {', '//comment','*ar { arg'], 'srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1528 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1529 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1530 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1531 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1532
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1533 filetype off
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1534 endfunc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1535
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1536 " Test dist#ft#FTscd()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1537 func Test_scd_file()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1538 filetype on
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1539
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1540 call writefile(['ijq(1)'], 'srcfile.scd')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1541 split srcfile.scd
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1542 call assert_equal('scdoc', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1543 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1544 call delete('srcfile.scd')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1545
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1546 filetype off
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1547 endfunc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1548
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1549 func Test_src_file()
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1550 filetype on
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1551
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1552 " KRL header start with "&WORD", but is not always present.
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1553 call writefile(['&ACCESS'], 'srcfile.src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1554 split srcfile.src
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1555 call assert_equal('krl', &filetype)
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1556 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1557 call delete('srcfile.src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1558
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1559 " KRL def with leading spaces, for KRL file extension is not case sensitive.
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1560 call writefile([' DEF srcfile()'], 'srcfile.Src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1561 split srcfile.Src
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1562 call assert_equal('krl', &filetype)
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1563 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1564 call delete('srcfile.Src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1565
28483
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1566 " KRL global deffct with embedded spaces, file starts with empty line(s).
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1567 for text in ['global def srcfile()', 'global deffct srcfile()']
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1568 call writefile(['', text], 'srcfile.SRC')
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1569 split srcfile.SRC
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1570 call assert_equal('krl', &filetype, text)
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1571 bwipe!
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1572 endfor
28377
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1573
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1574 " User may overrule file inspection
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1575 let g:filetype_src = 'src'
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1576 split srcfile.SRC
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1577 call assert_equal('src', &filetype)
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1578 bwipe!
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1579 call delete('srcfile.SRC')
28417
bca485676073 patch 8.2.4733: HEEx and Surface do need a separate filetype
Bram Moolenaar <Bram@vim.org>
parents: 28409
diff changeset
1580 unlet g:filetype_src
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1581
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1582 filetype off
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1583 endfunc
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1584
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1585 func Test_sys_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1586 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1587
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1588 " *.sys defaults to Batch file for MSDOS
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1589 call writefile(['looks like dos batch'], 'sysfile.sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1590 split sysfile.sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1591 call assert_equal('bat', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1592 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1593
28445
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1594 " Users preference set by g:filetype_sys
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1595 let g:filetype_sys = 'sys'
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1596 split sysfile.sys
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1597 call assert_equal('sys', &filetype)
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1598 unlet g:filetype_sys
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1599 bwipe!
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1600
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1601 " RAPID header start with a line containing only "%%%",
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1602 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1603 call writefile(['%%%'], 'sysfile.sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1604 split sysfile.sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1605 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1606 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1607 call delete('sysfile.sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1608
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1609 " RAPID supports umlauts in module names, leading spaces,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1610 " the .sys extension is not case sensitive.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1611 call writefile([' module ÃœmlautModule'], 'sysfile.Sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1612 split sysfile.Sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1613 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1614 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1615 call delete('sysfile.Sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1616
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1617 " RAPID is not case sensitive, embedded spaces, sysmodule,
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1618 " file starts with empty line(s).
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1619 call writefile(['', 'MODULE rapidmödüle (SYSMODULE,NOSTEPIN)'], 'sysfile.SYS')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1620 split sysfile.SYS
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1621 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1622 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1623 call delete('sysfile.SYS')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1624
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1625 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1626 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1627
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1628 func Test_tex_file()
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1629 filetype on
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1630
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1631 " only tests one case, should do more
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1632 let lines =<< trim END
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1633 % This is a sentence.
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1634
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1635 This is a sentence.
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1636 END
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1637 call writefile(lines, "Xfile.tex")
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1638 split Xfile.tex
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1639 call assert_equal('plaintex', &filetype)
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1640 bwipe
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1641
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1642 call delete('Xfile.tex')
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1643 filetype off
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1644 endfunc
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1645
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1646 func Test_tf_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1647 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1648
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1649 call writefile([';;; TF MUD client is super duper cool'], 'Xfile.tf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1650 split Xfile.tf
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1651 call assert_equal('tf', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1652 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1653
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1654 call writefile(['provider "azurerm" {'], 'Xfile.tf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1655 split Xfile.tf
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1656 call assert_equal('terraform', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1657 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1658
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1659 call delete('Xfile.tf')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1660 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1661 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1662
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1663 func Test_ts_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1664 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1665
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1666 call writefile(['<?xml version="1.0" encoding="utf-8"?>'], 'Xfile.ts')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1667 split Xfile.ts
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1668 call assert_equal('xml', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1669 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1670
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1671 call writefile(['// looks like Typescript'], 'Xfile.ts')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1672 split Xfile.ts
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1673 call assert_equal('typescript', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1674 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1675
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1676 call delete('Xfile.ts')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1677 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1678 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1679
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1680 func Test_ttl_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1681 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1682
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1683 call writefile(['@base <http://example.org/> .'], 'Xfile.ttl')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1684 split Xfile.ttl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1685 call assert_equal('turtle', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1686 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1687
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1688 call writefile(['looks like Tera Term Language'], 'Xfile.ttl')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1689 split Xfile.ttl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1690 call assert_equal('teraterm', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1691 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1692
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1693 call delete('Xfile.ttl')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1694 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1695 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1696
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1697 func Test_xpm_file()
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1698 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1699
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1700 call writefile(['this is XPM2'], 'file.xpm')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1701 split file.xpm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1702 call assert_equal('xpm2', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1703 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1704
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1705 call delete('file.xpm')
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1706 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1707 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1708
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1709
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
1710 " vim: shiftwidth=2 sts=2 expandtab