annotate src/testdir/test_filetype.vim @ 32415:8d7214baf422 v9.0.1539

patch 9.0.1539: typst filetype is not recognized Commit: https://github.com/vim/vim/commit/4ce1bda869e4ec0152d7dcbe1e491ceac5341d5e Author: Gaetan Lepage <gaetan@glepage.com> Date: Wed May 10 22:01:55 2023 +0100 patch 9.0.1539: typst filetype is not recognized Problem: Typst filetype is not recognized. Solution: Distinguish between sql and typst. (Gaetan Lepage, closes https://github.com/vim/vim/issues/12363)
author Bram Moolenaar <Bram@vim.org>
date Wed, 10 May 2023 23:15:04 +0200
parents d573c4b624b1
children 7d96dca159a1
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
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
17 call writefile(['# some comment', 'must be conf'], 'Xconffile', 'D')
11459
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
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 30023
diff changeset
21 split Xconffile
11459
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 filetype off
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 endfunc
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 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
29 filetype on
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 augroup filetypedetect
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 au BufNewFile,BufRead * call assert_equal(0, did_filetype())
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 30023
diff changeset
32 au BufNewFile,BufRead Xotherfile setf testfile
11459
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 * 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
34 augroup END
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
35 call writefile(['# some comment', 'must be conf'], 'Xotherfile', 'D')
30051
13b02c1ea0f7 patch 9.0.0363: common names in test files causes tests to be flaky
Bram Moolenaar <Bram@vim.org>
parents: 30023
diff changeset
36 split Xotherfile
11459
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 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
38
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 bwipe!
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 filetype off
561b76ed9d12 patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 endfunc
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
42
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
43 " Filetypes detected just from matching the file name.
29463
27ebab59172e patch 9.0.0073: too many files recognized as bsdl
Bram Moolenaar <Bram@vim.org>
parents: 29427
diff changeset
44 " First one is checking that these files have no filetype.
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
45 let s:filename_checks = {
29463
27ebab59172e patch 9.0.0073: too many files recognized as bsdl
Bram Moolenaar <Bram@vim.org>
parents: 29427
diff changeset
46 \ 'none': ['bsd', 'some-bsd'],
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'],
29714
1317743de840 patch 9.0.0197: astro files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29710
diff changeset
72 \ 'astro': ['file.astro'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
73 \ '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
74 \ '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
75 \ '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
76 \ '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
77 \ 'ave': ['file.ave'],
21817
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
78 \ '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
79 \ '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
80 \ 'basic': ['file.bas', 'file.bi', 'file.bm'],
32074
070940cc32b5 patch 9.0.1368: Bass files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32057
diff changeset
81 \ 'bass': ['file.bass'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
82 \ '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
83 \ 'bdf': ['file.bdf'],
23960
dbc6c893a67a patch 8.2.2522: Beancount filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23721
diff changeset
84 \ '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
85 \ 'bib': ['file.bib'],
27770
219471ed2fec patch 8.2.4411: bicep files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27653
diff changeset
86 \ '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
87 \ 'bindzone': ['named.root', '/bind/db.file', '/named/db.file', 'any/bind/db.file', 'any/named/db.file'],
29427
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
88 \ 'bitbake': ['file.bb', 'file.bbappend', 'file.bbclass', 'build/conf/local.conf', 'meta/conf/layer.conf', 'build/conf/bbappend.conf', 'meta-layer/conf/distro/foo.conf'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
89 \ 'blank': ['file.bl'],
30215
40491de2f0a6 patch 9.0.0443: blueprint files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30196
diff changeset
90 \ 'blueprint': ['file.blp'],
29463
27ebab59172e patch 9.0.0073: too many files recognized as bsdl
Bram Moolenaar <Bram@vim.org>
parents: 29427
diff changeset
91 \ 'bsdl': ['file.bsd', 'file.bsdl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
92 \ 'bst': ['file.bst'],
31718
bcedaa2fcb7b patch 9.0.1191: some Bazel files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31700
diff changeset
93 \ 'bzl': ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
94 \ '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
95 \ '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
96 \ 'cabal': ['file.cabal'],
22971
f39f960f3ea0 patch 8.2.2032: cabalconfig and cabalproject filetypes not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22918
diff changeset
97 \ 'cabalconfig': ['cabal.config'],
f39f960f3ea0 patch 8.2.2032: cabalconfig and cabalproject filetypes not recognized
Bram Moolenaar <Bram@vim.org>
parents: 22918
diff changeset
98 \ 'cabalproject': ['cabal.project', 'cabal.project.local'],
32124
a71e0e099950 patch 9.0.1393: Cairo files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32074
diff changeset
99 \ 'cairo': ['file.cairo'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
100 \ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
31794
745772308c81 patch 9.0.1229: Cap'n Proto files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31718
diff changeset
101 \ 'capnp': ['file.capnp'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
102 \ '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
103 \ '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
104 \ '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
105 \ '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
106 \ '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
107 \ 'cfengine': ['cfengine.conf'],
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
108 \ '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
109 \ '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
110 \ '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
111 \ 'chaskell': ['file.chs'],
30349
37a251ba4cf4 patch 9.0.0510: Chatito files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30322
diff changeset
112 \ 'chatito': ['file.chatito'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
113 \ '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
114 \ '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
115 \ '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
116 \ '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
117 \ '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
118 \ 'cmake': ['CMakeLists.txt', 'file.cmake', 'file.cmake.in'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
119 \ 'cmod': ['file.cmod'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
120 \ '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
121 \ '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
122 \ '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
123 \ 'conaryrecipe': ['file.recipe'],
29064
3fbc7462de59 patch 8.2.5054: no good filetype for conf files similar to dosini
Bram Moolenaar <Bram@vim.org>
parents: 28986
diff changeset
124 \ 'conf': ['auto.master'],
29397
7f5db9decf32 patch 9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Bram Moolenaar <Bram@vim.org>
parents: 29338
diff changeset
125 \ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file', 'any/etc/hostname.file'],
31847
a89903efd329 patch 9.0.1256: NetworkManager connection files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31796
diff changeset
126 \ 'confini': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
22834
fcbded1e3602 patch 8.2.1964: not all ConTeXt files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 22673
diff changeset
127 \ '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
128 \ 'cook': ['file.cook'],
32037
1171d97f415d patch 9.0.1350: CPON files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32033
diff changeset
129 \ 'cpon': ['file.cpon'],
32248
8e2ecfebd136 patch 9.0.1455: C++ 20 modules are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32214
diff changeset
130 \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh', 'file.cppm', 'file.ccm', 'file.cxxm', 'file.c++m'],
31125
0100be942b82 patch 9.0.0897: Clinical Quality Language files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31016
diff changeset
131 \ 'cqlang': ['file.cql'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
132 \ '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
133 \ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],
32168
6bdf843c3023 patch 9.0.1415: Crystal files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32162
diff changeset
134 \ 'crystal': ['file.cr'],
26570
b1f4052d6c51 patch 8.2.3814: .csx files and .sln files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26552
diff changeset
135 \ '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
136 \ '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
137 \ '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
138 \ '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
139 \ '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
140 \ 'cterm': ['file.con'],
29415
87174e9f7529 patch 9.0.0049: csv and tsv files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29397
diff changeset
141 \ 'csv': ['file.csv'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
142 \ '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
143 \ 'cuda': ['file.cu', 'file.cuh'],
32057
aa66dedd891c patch 9.0.1360: Cue files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32039
diff changeset
144 \ 'cue': ['file.cue'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
145 \ '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
146 \ '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
147 \ 'cvs': ['cvs123'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
148 \ 'cvsrc': ['.cvsrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
149 \ '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
150 \ 'd': ['file.d'],
18366
c6826a74ad9b patch 8.1.2177: Dart files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 18362
diff changeset
151 \ '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
152 \ '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
153 \ '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
154 \ '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
155 \ '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
156 \ '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
157 \ '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
158 \ '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
159 \ '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
160 \ 'desc': ['file.desc'],
20804
ad15725594f8 patch 8.2.0954: not all desktop files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 20756
diff changeset
161 \ 'desktop': ['file.desktop', '.directory', 'file.directory'],
32039
f08ee1b65dbf patch 9.0.1351: Dhall files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32037
diff changeset
162 \ 'dhall': ['file.dhall'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
163 \ '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
164 \ '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
165 \ '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
166 \ '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
167 \ 'dnsmasq': ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
28986
560793de4032 patch 8.2.5015: Hoon and Moonscript files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28954
diff changeset
168 \ 'dockerfile': ['Containerfile', 'Dockerfile', 'dockerfile', 'file.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
169 \ 'dosbatch': ['file.bat'],
31669
4372b50e0a1d patch 9.0.1167: EditorConfig files do not have their own filetype
Bram Moolenaar <Bram@vim.org>
parents: 31575
diff changeset
170 \ 'dosini': ['/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
171 \ '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
172 \ '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
173 \ '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
174 \ '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
175 \ '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
176 \ '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
177 \ '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
178 \ '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
179 \ '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
180 \ '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
181 \ 'edif': ['file.edf', 'file.edif', 'file.edo'],
31669
4372b50e0a1d patch 9.0.1167: EditorConfig files do not have their own filetype
Bram Moolenaar <Bram@vim.org>
parents: 31575
diff changeset
182 \ 'editorconfig': ['.editorconfig'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
183 \ 'eelixir': ['file.eex', 'file.leex'],
21018
2b07e2e7d95b patch 8.2.1060: not all elinks files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 21008
diff changeset
184 \ 'elinks': ['elinks.conf'],
25026
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
185 \ 'elixir': ['file.ex', 'file.exs', 'mix.lock'],
20579
6e6c98dc5732 patch 8.2.0843: filetype elm not detected
Bram Moolenaar <Bram@vim.org>
parents: 20361
diff changeset
186 \ '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
187 \ 'elmfilt': ['filter-rules'],
31857
a9d97517ac27 patch 9.0.1261: Elsa files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31847
diff changeset
188 \ 'elsa': ['file.lc'],
28277
4e2753f7ec65 patch 8.2.4664: Elvish files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28265
diff changeset
189 \ 'elvish': ['file.elv'],
23721
002fd1de0968 patch 8.2.2402: some filetypes not detected
Bram Moolenaar <Bram@vim.org>
parents: 23701
diff changeset
190 \ '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
191 \ '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
192 \ 'eruby': ['file.erb', 'file.rhtml'],
32172
7c131fe0b473 patch 9.0.1417: ESDL files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32168
diff changeset
193 \ 'esdl': ['file.esdl'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
194 \ '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
195 \ '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
196 \ '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
197 \ '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
198 \ '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
199 \ '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
200 \ 'exports': ['exports'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
201 \ '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
202 \ '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
203 \ 'fan': ['file.fan', 'file.fwt'],
23701
c5b5e7520fe2 patch 8.2.2392: fennel filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23685
diff changeset
204 \ '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
205 \ 'fetchmail': ['.fetchmailrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
206 \ 'fgl': ['file.4gl', 'file.4gh', 'file.m4gl'],
31883
f9dbb07cad5a patch 9.0.1274: FIRRTL files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31879
diff changeset
207 \ 'firrtl': ['file.fir'],
26141
77ad8ea01c00 patch 8.2.3603: fish filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26133
diff changeset
208 \ '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
209 \ '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
210 \ '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
211 \ '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
212 \ '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
213 \ '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
214 \ '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
215 \ 'freebasic': ['file.fb'],
31515
7f3f8543611e patch 9.0.1090: FHIR Shorthand files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31499
diff changeset
216 \ 'fsh': ['file.fsh'],
26344
36f3a77e4b8c patch 8.2.3703: most people call F# "fsharp" and not "fs"
Bram Moolenaar <Bram@vim.org>
parents: 26311
diff changeset
217 \ '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
218 \ 'fstab': ['fstab', 'mtab'],
31912
91d21a5ee588 patch 9.0.1288: FunC files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31900
diff changeset
219 \ 'func': ['file.fc'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
220 \ '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
221 \ '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
222 \ 'gdb': ['.gdbinit', 'gdbinit', 'file.gdb', '.config/gdbearlyinit', '.gdbearlyinit'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
223 \ 'gdmo': ['file.mo', 'file.gdmo'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
224 \ 'gdresource': ['file.tscn', 'file.tres'],
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
225 \ 'gdscript': ['file.gd'],
29962
32e35a6d4292 patch 9.0.0319: Godot shader files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29952
diff changeset
226 \ 'gdshader': ['file.gdshader', 'file.shader'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
227 \ '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
228 \ '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
229 \ 'gift': ['file.gift'],
30176
042513ec99d7 patch 9.0.0424: gitattributes files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30162
diff changeset
230 \ 'gitattributes': ['file.git/info/attributes', '.gitattributes', '/.config/git/attributes', '/etc/gitattributes', '/usr/local/etc/gitattributes', 'some.git/info/attributes'],
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
231 \ 'gitcommit': ['COMMIT_EDITMSG', 'MERGE_MSG', 'TAG_EDITMSG', 'NOTES_EDITMSG', 'EDIT_DESCRIPTION'],
29397
7f5db9decf32 patch 9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Bram Moolenaar <Bram@vim.org>
parents: 29338
diff changeset
232 \ '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', 'any/etc/gitconfig.d/file', '/.gitconfig.d/file', 'any/.config/git/config', 'any/.gitconfig.d/file', 'some.git/config', 'some.git/modules/any/config'],
30196
381462ee23fd patch 9.0.0434: gitignore files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30182
diff changeset
233 \ 'gitignore': ['file.git/info/exclude', '.gitignore', '/.config/git/ignore', 'some.git/info/exclude'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
234 \ '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
235 \ '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
236 \ 'gitsendemail': ['.gitsendemail.msg.xxxxxx'],
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
237 \ 'gkrellmrc': ['gkrellmrc', 'gkrellmrc_x'],
28650
be4410fa2bac patch 8.2.4849: Gleam filetype not detected
Bram Moolenaar <Bram@vim.org>
parents: 28604
diff changeset
238 \ 'gleam': ['file.gleam'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
239 \ '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
240 \ 'gnash': ['gnashrc', '.gnashrc', 'gnashpluginrc', '.gnashpluginrc'],
27317
839be955609f patch 8.2.4187: gnuplot file not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27287
diff changeset
241 \ '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
242 \ 'go': ['file.go'],
26688
4b8d0a62f78b patch 8.2.3873: go.mod files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26628
diff changeset
243 \ 'gomod': ['go.mod'],
31892
99d634091eec patch 9.0.1278: go.work.sum files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31883
diff changeset
244 \ 'gosum': ['go.sum', 'go.work.sum'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
245 \ '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
246 \ '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
247 \ '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
248 \ 'grads': ['file.gs'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
249 \ '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
250 \ 'gretl': ['file.gretl'],
32272
2df0f9779992 patch 9.0.1467: Jenkinsfiles are not recognized as groovy
Bram Moolenaar <Bram@vim.org>
parents: 32266
diff changeset
251 \ 'groovy': ['file.gradle', 'file.groovy', 'Jenkinsfile'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
252 \ '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
253 \ '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
254 \ '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
255 \ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'],
30529
09b3221423e9 patch 9.0.0600: GYP files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30527
diff changeset
256 \ 'gyp': ['file.gyp', 'file.gypi'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
257 \ '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
258 \ 'haml': ['file.haml'],
22989
7160e85d62ff patch 8.2.2041: haskell filetype not optimally recognized
Bram Moolenaar <Bram@vim.org>
parents: 22971
diff changeset
259 \ 'hamster': ['file.hsm'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
260 \ 'handlebars': ['file.hbs'],
29324
71f2af5d8447 patch 9.0.0005: hare files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29181
diff changeset
261 \ 'hare': ['file.ha'],
24681
1077a2762d06 patch 8.2.2879: file extension .hsig not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24598
diff changeset
262 \ '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
263 \ '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
264 \ '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
265 \ 'hb': ['file.hb'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
266 \ 'hcl': ['file.hcl'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
267 \ '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
268 \ 'hercules': ['file.vc', 'file.ev', 'file.sum', 'file.errsum'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
269 \ '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
270 \ '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
271 \ 'hjson': ['file.hjson'],
30495
94d484e60434 patch 9.0.0583: only recognizing .m3u8 files is inconsistent
Bram Moolenaar <Bram@vim.org>
parents: 30461
diff changeset
272 \ 'hlsplaylist': ['file.m3u', 'file.m3u8'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
273 \ '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
274 \ 'hollywood': ['file.hws'],
28986
560793de4032 patch 8.2.5015: Hoon and Moonscript files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28954
diff changeset
275 \ 'hoon': ['file.hoon'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
276 \ '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
277 \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
28604
9c70f7df6d61 patch 8.2.4826: .cshtml files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28538
diff changeset
278 \ 'html': ['file.html', 'file.htm', 'file.cshtml'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
279 \ '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
280 \ 'httest': ['file.htt', 'file.htb'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
281 \ 'i3config': ['/home/user/.i3/config', '/home/user/.config/i3/config', '/etc/i3/config', '/etc/xdg/i3/config'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
282 \ '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
283 \ '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
284 \ '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
285 \ '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
286 \ '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
287 \ '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
288 \ 'inittab': ['inittab'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
289 \ '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
290 \ '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
291 \ '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
292 \ '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
293 \ '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
294 \ '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
295 \ '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
296 \ 'javacc': ['file.jj', 'file.jjt'],
30132
01919e5a070c patch 9.0.0402: javascript module files are not recoginzed
Bram Moolenaar <Bram@vim.org>
parents: 30051
diff changeset
297 \ 'javascript': ['file.js', 'file.jsm', '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
298 \ '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
299 \ '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
300 \ '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
301 \ 'jgraph': ['file.jgr'],
31541
f2da18e495aa patch 9.0.1103: jq files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31515
diff changeset
302 \ 'jq': ['file.jq'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
303 \ 'jovial': ['file.jov', 'file.j73', 'file.jovial'],
31237
5bdf73161e65 patch 9.0.0952: Eclipse preference files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31217
diff changeset
304 \ 'jproperties': ['file.properties', 'file.properties_xx', 'file.properties_xx_xx', 'some.properties_xx_xx_file', 'org.eclipse.xyz.prefs'],
31871
e46f41a1b7c5 patch 9.0.1268: .clangd and .stylelintrc files don't get a filetype
Bram Moolenaar <Bram@vim.org>
parents: 31861
diff changeset
305 \ 'json': ['file.json', 'file.jsonp', 'file.json-patch', 'file.webmanifest', 'Pipfile.lock', 'file.ipynb', '.prettierrc', '.firebaserc', '.stylelintrc', 'file.slnf'],
27326
234516a43f33 patch 8.2.4191: json5 files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27319
diff changeset
306 \ 'json5': ['file.json5'],
31879
f13d7423396c patch 9.0.1272: typo in pattern for filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 31871
diff changeset
307 \ 'jsonc': ['file.jsonc', '.babelrc', '.eslintrc', '.jsfmtrc', '.jshintrc', '.hintrc', '.swrc', 'jsconfig.json', 'tsconfig.json', 'tsconfig.test.json', 'tsconfig-test.json'],
30948
cdb345a925d0 patch 9.0.0808: jsonnet filetype detection has a typo
Bram Moolenaar <Bram@vim.org>
parents: 30928
diff changeset
308 \ 'jsonnet': ['file.jsonnet', 'file.libsonnet'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
309 \ 'jsp': ['file.jsp'],
25493
224c96c497d3 patch 8.2.3283: Julia filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25100
diff changeset
310 \ '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
311 \ 'kconfig': ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
31861
c46ad2a51854 patch 9.0.1263: KDL files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31857
diff changeset
312 \ 'kdl': ['file.kdl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
313 \ '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
314 \ 'kix': ['file.kix'],
19263
06d9be5c0107 patch 8.2.0190: Kotlin files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 19205
diff changeset
315 \ '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
316 \ '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
317 \ '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
318 \ '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
319 \ '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
320 \ '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
321 \ '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
322 \ 'ldif': ['file.ldif'],
32176
50f887578908 patch 9.0.1419: Lean files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32172
diff changeset
323 \ 'lean': ['file.lean'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
324 \ '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
325 \ '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
326 \ '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
327 \ '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
328 \ '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
329 \ '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
330 \ '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
331 \ 'lilo': ['lilo.conf', 'lilo.conf-file'],
28532
11387538e7c4 patch 8.2.4790: lilypond filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28513
diff changeset
332 \ 'lilypond': ['file.ly', 'file.ily'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
333 \ '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
334 \ '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
335 \ '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
336 \ '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
337 \ 'litestep': ['/LiteStep/any/file.rc', 'any/LiteStep/any/file.rc'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
338 \ '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'],
32198
8643e060bcb8 patch 9.0.1430: Livebook files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32188
diff changeset
339 \ 'livebook': ['file.livemd'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
340 \ '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
341 \ '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
342 \ '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
343 \ '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
344 \ 'lout': ['file.lou', 'file.lout'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
345 \ 'lpc': ['file.lpc', 'file.ulpc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
346 \ '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
347 \ 'lss': ['file.lss'],
32288
8201b0fcea02 patch 9.0.1476: lines put in non-current window are not displayed
Bram Moolenaar <Bram@vim.org>
parents: 32272
diff changeset
348 \ 'lua': ['file.lua', 'file.rockspec', 'file.nse', '.luacheckrc', '.busted'],
32343
d573c4b624b1 patch 9.0.1503: Luau files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32292
diff changeset
349 \ 'luau': ['file.luau'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
350 \ 'lynx': ['lynx.cfg'],
30322
2f79b10e82d1 patch 9.0.0497: LyRiCs files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30287
diff changeset
351 \ 'lyrics': ['file.lrc'],
24458
1d126cb683c1 patch 8.2.2769: Modula-3 config files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24347
diff changeset
352 \ 'm3build': ['m3makefile', 'm3overrides'],
1d126cb683c1 patch 8.2.2769: Modula-3 config files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24347
diff changeset
353 \ '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
354 \ '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
355 \ '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
356 \ '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
357 \ '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
358 \ '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
359 \ '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
360 \ '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
361 \ '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
362 \ '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
363 \ '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
364 \ '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
365 \ '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
366 \ 'master': ['file.mas', 'file.master'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
367 \ 'matlab': ['file.m'],
28538
48712267f57b patch 8.2.4793: recognizing Maxima filetype even though it might be another
Bram Moolenaar <Bram@vim.org>
parents: 28532
diff changeset
368 \ 'maxima': ['file.demo', 'file.dmt', 'file.dm1', 'file.dm2', 'file.dm3',
28513
6a1e5b188374 patch 8.2.4781: Maxima files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28507
diff changeset
369 \ 'file.wxm', 'maxima-init.mac'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
370 \ 'mel': ['file.mel'],
31176
0795700291ae patch 9.0.0922: Mermaid files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31125
diff changeset
371 \ 'mermaid': ['file.mmd', 'file.mmdc', 'file.mermaid'],
18362
8144f89e6f28 patch 8.1.2175: meson files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 17867
diff changeset
372 \ '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
373 \ '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
374 \ '/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
375 \ '/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
376 \ '/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
377 \ '/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
378 \ '/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
379 \ '/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
380 \ '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
381 \ '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
382 \ '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
383 \ '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
384 \ '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
385 \ '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
386 \ '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
387 \ '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
388 \ 'modula2': ['file.m2', 'file.mi'],
30890
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
389 \ 'modula3': ['file.m3', 'file.mg', 'file.i3', 'file.ig', 'file.lm3'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
390 \ '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
391 \ 'moo': ['file.moo'],
28986
560793de4032 patch 8.2.5015: Hoon and Moonscript files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28954
diff changeset
392 \ 'moonscript': ['file.moon'],
31918
6ca26985ccb3 patch 9.0.1291: Move language files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31912
diff changeset
393 \ 'move': ['file.move'],
29710
0edbf9b01c42 patch 9.0.0195: metafun files are not recogized
Bram Moolenaar <Bram@vim.org>
parents: 29684
diff changeset
394 \ 'mp': ['file.mp', 'file.mpxl', 'file.mpiv', 'file.mpvi'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
395 \ '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
396 \ '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
397 \ '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
398 \ '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
399 \ '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
400 \ '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
401 \ '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
402 \ 'mysql': ['file.mysql'],
12052
7eb512f2a896 patch 8.0.0906: don't recognize Couchbase files
Christian Brabandt <cb@256bit.org>
parents: 12029
diff changeset
403 \ '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
404 \ '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
405 \ 'nanorc': ['/etc/nanorc', 'file.nanorc', 'any/etc/nanorc'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
406 \ 'natural': ['file.NSA', 'file.NSC', 'file.NSG', 'file.NSL', 'file.NSM', 'file.NSN', 'file.NSP', 'file.NSS'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
407 \ 'ncf': ['file.ncf'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
408 \ 'neomuttrc': ['Neomuttrc', '.neomuttrc', '.neomuttrc-file', '/.neomutt/neomuttrc', '/.neomutt/neomuttrc-file', 'Neomuttrc', 'Neomuttrc-file', 'any/.neomutt/neomuttrc', 'any/.neomutt/neomuttrc-file', 'neomuttrc', 'neomuttrc-file'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
409 \ 'netrc': ['.netrc'],
25860
a7305a9b32ba patch 8.2.3464: nginx files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25848
diff changeset
410 \ 'nginx': ['file.nginx', 'nginxfile.conf', 'filenginx.conf', 'any/etc/nginx/file', 'any/usr/local/nginx/conf/file', 'any/nginx/file.conf'],
30461
0b8d532e124d patch 9.0.0566: Nim files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30453
diff changeset
411 \ 'nim': ['file.nim', 'file.nims', 'file.nimble'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
412 \ 'ninja': ['file.ninja'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
413 \ '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
414 \ '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
415 \ '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
416 \ 'nsis': ['file.nsi', 'file.nsh'],
32180
79ab211a3676 patch 9.0.1421: Nu files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32176
diff changeset
417 \ 'nu': ['env.nu', 'config.nu'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
418 \ 'obj': ['file.obj'],
31196
48e44371a9ff patch 9.0.0932: Oblivion files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31176
diff changeset
419 \ 'obse': ['file.obl', 'file.obse', 'file.oblivion', 'file.obscript'],
23430
9e60204aea6e patch 8.2.2258: not all OCaml related files are detected
Bram Moolenaar <Bram@vim.org>
parents: 23316
diff changeset
420 \ '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
421 \ 'occam': ['file.occ'],
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
422 \ 'octave': ['octaverc', '.octaverc', 'octave.conf'],
32128
9730da870503 patch 9.0.1395: Odin files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32126
diff changeset
423 \ 'odin': ['file.odin'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
424 \ '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
425 \ '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
426 \ 'openroad': ['file.or'],
28485
75f181bef230 patch 8.2.4767: openscad files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28483
diff changeset
427 \ 'openscad': ['file.scad'],
30896
87d9843b59db patch 9.0.0782: OpenVPN files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30890
diff changeset
428 \ 'openvpn': ['file.ovpn', '/etc/openvpn/client/client.conf', '/usr/share/openvpn/examples/server.conf'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
429 \ 'opl': ['file.OPL', 'file.OPl', 'file.OpL', 'file.Opl', 'file.oPL', 'file.oPl', 'file.opL', 'file.opl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
430 \ 'ora': ['file.ora'],
28265
67ef250562e5 patch 8.2.4658: org-mode files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28093
diff changeset
431 \ '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
432 \ '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
433 \ '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
434 \ '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
435 \ '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
436 \ '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
437 \ '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
438 \ 'pccts': ['file.g'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
439 \ 'pcmk': ['file.pcmk'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
440 \ 'pdf': ['file.pdf'],
30527
5b7e094fddd7 patch 9.0.0599: latexmkrc files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30495
diff changeset
441 \ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc', '.latexmkrc', 'latexmkrc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
442 \ 'pf': ['pf.conf'],
31547
a48b559cdfc4 patch 9.0.1106: not all postfix files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 31541
diff changeset
443 \ 'pfmain': ['main.cf', 'main.cf.proto'],
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
444 \ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt', 'file.theme'],
13128
41b7a660ed2a patch 8.0.1438: filetype detection test not updated for change
Christian Brabandt <cb@256bit.org>
parents: 12688
diff changeset
445 \ 'pike': ['file.pike', 'file.pmod'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
446 \ '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
447 \ '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
448 \ '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
449 \ '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
450 \ '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
451 \ '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
452 \ '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
453 \ '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
454 \ 'pod': ['file.pod'],
30715
316844a05a8b patch 9.0.0692: PoE filter files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30572
diff changeset
455 \ 'poefilter': ['file.filter'],
24099
209caadb403f patch 8.2.2591: Poke files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23962
diff changeset
456 \ 'poke': ['file.pk'],
32162
c1bf74e139c3 patch 9.0.1412: Pony files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32156
diff changeset
457 \ 'pony': ['file.pony'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
458 \ '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
459 \ '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
460 \ 'povini': ['.povrayrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
461 \ '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
462 \ 'ppwiz': ['file.it', 'file.ih'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
463 \ '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
464 \ 'privoxy': ['file.action'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
465 \ '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
466 \ '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
467 \ '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
468 \ '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
469 \ '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
470 \ '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
471 \ '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
472 \ '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
473 \ 'psf': ['file.psf'],
24466
f5a6a6e98ec4 patch 8.2.2773: PSL filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 24458
diff changeset
474 \ 'psl': ['file.psl'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
475 \ 'pug': ['file.pug'],
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
476 \ 'puppet': ['file.pp'],
25676
0385bd4411b7 patch 8.2.3374: Pyret files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25664
diff changeset
477 \ '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
478 \ '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
479 \ '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
480 \ 'ql': ['file.ql', 'file.qll'],
32154
8be608cee6e3 patch 9.0.1408: QMLdir files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32152
diff changeset
481 \ 'qmldir': ['qmldir'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
482 \ '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'],
29684
d6c90b936159 patch 9.0.0182: quarto files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29503
diff changeset
483 \ 'quarto': ['file.qmd'],
30835
93d8f81b8610 patch 9.0.0752: Rprofile files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30793
diff changeset
484 \ 'r': ['file.r', '.Rprofile', 'Rprofile', 'Rprofile.site'],
32156
70242ce3ec3d patch 9.0.1409: racket files are recognized as scheme
Bram Moolenaar <Bram@vim.org>
parents: 32154
diff changeset
485 \ 'racket': ['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
486 \ '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
487 \ 'raku': ['file.pm6', 'file.p6', 'file.t6', 'file.pod6', 'file.raku', 'file.rakumod', 'file.rakudoc', 'file.rakutest'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
488 \ '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
489 \ 'ratpoison': ['.ratpoisonrc', 'ratpoisonrc'],
23721
002fd1de0968 patch 8.2.2402: some filetypes not detected
Bram Moolenaar <Bram@vim.org>
parents: 23701
diff changeset
490 \ '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
491 \ '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
492 \ '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
493 \ 'readline': ['.inputrc', 'inputrc'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
494 \ 'rego': ['file.rego'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
495 \ 'remind': ['.reminders', 'file.remind', 'file.rem', '.reminders-file'],
27653
52bbe3590f50 patch 8.2.4352: ReScript files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27559
diff changeset
496 \ '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
497 \ '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
498 \ '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
499 \ 'rexx': ['file.rex', 'file.orx', 'file.rxo', 'file.rxj', 'file.jrexx', 'file.rexxj', 'file.rexx', 'file.testGroup', 'file.testUnit'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
500 \ 'rhelp': ['file.rd'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
501 \ 'rib': ['file.rib'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
502 \ 'rmd': ['file.rmd', 'file.smd'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
503 \ '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
504 \ 'rng': ['file.rng'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
505 \ 'rnoweb': ['file.rnw', 'file.snw'],
32150
3923c5051b87 patch 9.0.1406: ILE RPG files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32128
diff changeset
506 \ 'rpgle': ['file.rpgle', 'file.rpgleinc'],
28662
dfe200e3d315 patch 8.2.4855: robot files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28650
diff changeset
507 \ 'robot': ['file.robot', 'file.resource'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
508 \ 'robots': ['robots.txt'],
31900
e120f9c227e5 patch 9.0.1282: Ron files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31898
diff changeset
509 \ 'ron': ['file.ron'],
26131
87d8f52d3821 patch 8.2.3598: RouterOS filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25971
diff changeset
510 \ '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
511 \ '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
512 \ 'rpl': ['file.rpl'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
513 \ 'rrst': ['file.rrst', 'file.srst'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
514 \ '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
515 \ 'rtf': ['file.rtf'],
28380
90d43a367955 patch 8.2.4715: Vagrantfile not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28377
diff changeset
516 \ '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
517 \ '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
518 \ '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
519 \ '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
520 \ '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
521 \ '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
522 \ 'sbt': ['file.sbt'],
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
523 \ 'scala': ['file.scala'],
32156
70242ce3ec3d patch 9.0.1409: racket files are recognized as scheme
Bram Moolenaar <Bram@vim.org>
parents: 32154
diff changeset
524 \ 'scheme': ['file.scm', 'file.ss', 'file.sld'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
525 \ '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
526 \ 'screen': ['.screenrc', 'screenrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
527 \ '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
528 \ '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
529 \ '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
530 \ '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
531 \ 'sed': ['file.sed'],
27096
d539c144aeb4 patch 8.2.4077: not all Libsensors files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 27070
diff changeset
532 \ '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
533 \ '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
534 \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
535 \ 'sexplib': ['file.sexp'],
24347
1df930301857 patch 8.2.2714: filetype pattern ending in star is too far up
Bram Moolenaar <Bram@vim.org>
parents: 24299
diff changeset
536 \ '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
537 \ 'sieve': ['file.siv', 'file.sieve'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
538 \ 'sil': ['file.sil'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
539 \ '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
540 \ '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
541 \ '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
542 \ 'skill': ['file.il', 'file.ils', 'file.cdf'],
31898
31d269fb880e patch 9.0.1281: Cadence files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31892
diff changeset
543 \ 'cdc': ['file.cdc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
544 \ 'slang': ['file.sl'],
32182
d53f7be86b38 patch 9.0.1422: Sage files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32180
diff changeset
545 \ 'sage': ['file.sage'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
546 \ 'slice': ['file.ice'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
547 \ '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
548 \ '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
549 \ '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
550 \ 'slrnrc': ['.slrnrc'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
551 \ '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
552 \ 'sm': ['sendmail.cf'],
31684
8153d73088f2 patch 9.0.1174: smali files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31669
diff changeset
553 \ 'smali': ['file.smali'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
554 \ '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
555 \ '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
556 \ 'smith': ['file.smt', 'file.smith'],
31688
ead5a3f43a4c patch 9.0.1176: smithy files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31684
diff changeset
557 \ 'smithy': ['file.smithy'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
558 \ '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
559 \ 'snobol4': ['file.sno', 'file.spt'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
560 \ 'solidity': ['file.sol'],
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
561 \ 'solution': ['file.sln'],
23622
53cbcc2d2234 patch 8.2.2353: spartql files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 23584
diff changeset
562 \ '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
563 \ '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
564 \ '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
565 \ '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
566 \ 'spyce': ['file.spy', 'file.spi'],
32415
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
567 \ 'sql': ['file.tyb', 'file.tyc', 'file.pkb', 'file.pks'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
568 \ 'sqlj': ['file.sqlj'],
31974
938ad9626b84 patch 9.0.1319: PRQL files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31918
diff changeset
569 \ 'prql': ['file.prql'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
570 \ '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
571 \ 'squid': ['squid.conf'],
26396
f4e6431ca146 patch 8.2.3729: no support for squirrels
Bram Moolenaar <Bram@vim.org>
parents: 26390
diff changeset
572 \ '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
573 \ 'srec': ['file.s19', 'file.s28', 'file.s37', 'file.mot', 'file.srec'],
30224
1fbc86e18258 patch 9.0.0448: SubRip files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30215
diff changeset
574 \ 'srt': ['file.srt'],
30753
b6b326671396 patch 9.0.0711: SubStation Alpha files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30715
diff changeset
575 \ 'ssa': ['file.ass', 'file.ssa'],
26933
959f943e6dd1 patch 8.2.3995: not all sshconfig files are detected as such
Bram Moolenaar <Bram@vim.org>
parents: 26871
diff changeset
576 \ '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
577 \ '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
578 \ 'st': ['file.st'],
32029
23e8d0371e35 patch 9.0.1346: Starlark files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32011
diff changeset
579 \ 'starlark': ['file.ipd', 'file.star', 'file.starlark'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
580 \ '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
581 \ 'stp': ['file.stp'],
26143
741cb243a7d2 patch 8.2.3604: not all sudoers files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 26141
diff changeset
582 \ 'sudoers': ['any/etc/sudoers', 'sudoers.tmp', '/etc/sudoers', 'any/etc/sudoers.d/file'],
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
583 \ '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
584 \ 'surface': ['file.sface'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
585 \ 'svelte': ['file.svelte'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
586 \ '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
587 \ 'svn': ['svn-commitfile.tmp', 'svn-commit-file.tmp', 'svn-commit.tmp'],
29503
e6e18c0a1694 patch 9.0.0093: sway config files are recognized as i3config
Bram Moolenaar <Bram@vim.org>
parents: 29493
diff changeset
588 \ 'swayconfig': ['/home/user/.sway/config', '/home/user/.config/sway/config', '/etc/sway/config', '/etc/xdg/sway/config'],
19164
bfe90421e223 patch 8.2.0141: no swift filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 18926
diff changeset
589 \ 'swift': ['file.swift'],
bfe90421e223 patch 8.2.0141: no swift filetype detection
Bram Moolenaar <Bram@vim.org>
parents: 18926
diff changeset
590 \ 'swiftgyb': ['file.swift.gyb'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
591 \ '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
592 \ '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
593 \ '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
594 \ 'tags': ['tags'],
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
595 \ 'tak': ['file.tak'],
32126
fb13656998a5 patch 9.0.1394: Unx Tal files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32124
diff changeset
596 \ 'tal': ['file.tal'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
597 \ '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
598 \ '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
599 \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc'],
32152
affa1f55a761 patch 9.0.1407: TableGen files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32150
diff changeset
600 \ 'tablegen': ['file.td'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
601 \ 'teal': ['file.tl'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
602 \ '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
603 \ '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
604 \ 'terminfo': ['file.ti'],
29485
7355529ee87f patch 9.0.0084: using "terraform" filetype for .tfvars file is bad
Bram Moolenaar <Bram@vim.org>
parents: 29463
diff changeset
605 \ 'terraform-vars': ['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
606 \ '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
607 \ '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
608 \ 'texmf': ['texmf.cnf'],
26478
dd09291cf1ac patch 8.2.3769: zig files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26398
diff changeset
609 \ '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
610 \ 'tf': ['file.tf', '.tfrc', 'tfrc'],
31796
e2fa5867a7bd patch 9.0.1230: Apache thrift files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31794
diff changeset
611 \ 'thrift': ['file.thrift'],
22353
889143dbe2cd patch 8.2.1725: not all Pascal files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 22033
diff changeset
612 \ '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
613 \ 'tilde': ['file.t.html'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
614 \ '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
615 \ 'tli': ['file.tli'],
25935
c90b8e41b10e patch 8.2.3501: tmux filetype dection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 25915
diff changeset
616 \ '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
617 \ '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
618 \ '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
619 \ '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
620 \ '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
621 \ '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
622 \ '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
623 \ '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
624 \ 'tssop': ['file.tssop'],
29415
87174e9f7529 patch 9.0.0049: csv and tsv files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29397
diff changeset
625 \ 'tsv': ['file.tsv'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
626 \ 'twig': ['file.twig'],
30533
4f6c0ca7530b patch 9.0.0602: new TypeScript extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30529
diff changeset
627 \ 'typescript': ['file.mts', 'file.cts'],
27796
8fdc92bdcff1 patch 8.2.4424: ".gts" and ".gjs" files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27776
diff changeset
628 \ '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
629 \ 'typescriptreact': ['file.tsx'],
32033
5bf9832d3e00 patch 9.0.1348: Un-grammar files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32029
diff changeset
630 \ 'ungrammar': ['file.ungram'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
631 \ '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
632 \ '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
633 \ '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
634 \ '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
635 \ '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
636 \ '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
637 \ '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
638 \ '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
639 \ '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
640 \ '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
641 \ '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
642 \ 'usw2kagtlog': ['usw2kagt.log', 'USW2KAGT.LOG', 'usw2kagt.file.log', 'USW2KAGT.FILE.LOG', 'file.usw2kagt.log', 'FILE.USW2KAGT.LOG'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
643 \ '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
644 \ 'vb': ['file.sba', 'file.vb', 'file.vbs', 'file.dsm', 'file.ctl'],
30287
8730f0f77e00 patch 9.0.0479: in :def function all closures in loop get the same variables
Bram Moolenaar <Bram@vim.org>
parents: 30224
diff changeset
645 \ 'vdf': ['file.vdf'],
29952
eba6020b286a patch 9.0.0314: VDM files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29714
diff changeset
646 \ 'vdmpp': ['file.vpp', 'file.vdmpp'],
eba6020b286a patch 9.0.0314: VDM files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29714
diff changeset
647 \ 'vdmrt': ['file.vdmrt'],
eba6020b286a patch 9.0.0314: VDM files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 29714
diff changeset
648 \ 'vdmsl': ['file.vdm', 'file.vdmsl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
649 \ '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
650 \ '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
651 \ '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
652 \ 'vhdl': ['file.hdl', 'file.vhd', 'file.vhdl', 'file.vbe', 'file.vst', 'file.vhdl_123', 'file.vho', 'some.vhdl_1', 'some.vhdl_1-file'],
31016
f825a2646cc0 patch 9.0.0843: VHS tape files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30960
diff changeset
653 \ 'vhs': ['file.tape'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
654 \ '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
655 \ '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
656 \ '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
657 \ '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
658 \ '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
659 \ '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
660 \ 'vue': ['file.vue'],
32188
70d078793ad2 patch 9.0.1425: "wat" and "wast" files are one filetype
Bram Moolenaar <Bram@vim.org>
parents: 32184
diff changeset
661 \ 'wat': ['file.wat'],
70d078793ad2 patch 9.0.1425: "wat" and "wast" files are one filetype
Bram Moolenaar <Bram@vim.org>
parents: 32184
diff changeset
662 \ 'wast': ['file.wast'],
31217
e651c7a29c87 patch 9.0.0942: Workflow Description Language files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31203
diff changeset
663 \ 'wdl': ['file.wdl'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
664 \ '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
665 \ 'wget': ['.wgetrc', 'wgetrc'],
28670
239bd331e0a9 patch 8.2.4859: wget2 files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28662
diff changeset
666 \ 'wget2': ['.wget2rc', 'wget2rc'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
667 \ 'winbatch': ['file.wbt'],
32184
f1602cf7022f patch 9.0.1423: WebAssembly Interface Type files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32182
diff changeset
668 \ 'wit': ['file.wit'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
669 \ '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
670 \ '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
671 \ '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
672 \ '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
673 \ 'xdefaults': ['.Xdefaults', '.Xpdefaults', '.Xresources', 'xdm-config', 'file.ad', '/Xresources/file', '/app-defaults/file', 'Xresources', 'Xresources-file', 'any/Xresources/file', 'any/app-defaults/file'],
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
674 \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
675 \ '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
676 \ '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
677 \ '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
678 \ '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
679 \ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
25915
36f2c43bd671 patch 8.2.3491: xpm2 filetype dection is not so good
Bram Moolenaar <Bram@vim.org>
parents: 25878
diff changeset
680 \ '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
681 \ '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
682 \ '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
683 \ '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
684 \ '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
685 \ '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
686 \ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
31871
e46f41a1b7c5 patch 9.0.1268: .clangd and .stylelintrc files don't get a filetype
Bram Moolenaar <Bram@vim.org>
parents: 31861
diff changeset
687 \ 'yaml': ['file.yaml', 'file.yml', '.clangd', '.clang-format', '.clang-tidy'],
27336
9ef98290c41a patch 8.2.4196: various file types not recognized
Bram Moolenaar <Bram@vim.org>
parents: 27326
diff changeset
688 \ 'yang': ['file.yang'],
32011
b4d89bd4b517 patch 9.0.1337: yuck files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31974
diff changeset
689 \ 'yuck': ['file.yuck'],
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
690 \ 'z8a': ['file.z8a'],
26478
dd09291cf1ac patch 8.2.3769: zig files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26398
diff changeset
691 \ '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
692 \ '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
693 \ 'zimbutempl': ['file.zut'],
31361
abb9d25924d8 patch 9.0.1014: zir files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 31237
diff changeset
694 \ 'zir': ['file.zir'],
22557
d16f9bd12b82 patch 8.2.1827: filetype detection does not test enough file names
Bram Moolenaar <Bram@vim.org>
parents: 22462
diff changeset
695 \ '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
696 \
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
697 \ '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
698 \ }
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
699
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
700 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
701 \ 'modula2': ['file.DEF'],
22033
cdf95988615a patch 8.2.1566: not all Bazel files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 21849
diff changeset
702 \ '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
703 \ }
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
704
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
705 func CheckItems(checks)
22673
67aa7507ea2e patch 8.2.1885: filetype tests unnessarily creates swap files
Bram Moolenaar <Bram@vim.org>
parents: 22557
diff changeset
706 set noswapfile
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
707 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
708 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
709 new
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
710 try
17528
62a6d99082f7 patch 8.1.1762: some filetype rules are in the wrong place
Bram Moolenaar <Bram@vim.org>
parents: 17526
diff changeset
711 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
712 catch
17555
c2eb5118ba89 patch 8.1.1775: error message may be empty in filetype test
Bram Moolenaar <Bram@vim.org>
parents: 17528
diff changeset
713 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
714 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
715 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
716 " 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
717 else
29463
27ebab59172e patch 9.0.0073: too many files recognized as bsdl
Bram Moolenaar <Bram@vim.org>
parents: 29427
diff changeset
718 let expected = ft == 'none' ? '' : ft
27ebab59172e patch 9.0.0073: too many files recognized as bsdl
Bram Moolenaar <Bram@vim.org>
parents: 29427
diff changeset
719 call assert_equal(expected, &filetype, 'with file name: ' . names[i])
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
720 endif
12027
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
721 bwipe!
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
722 endfor
c2aa4af29251 patch 8.0.0894: there is no test for runtime filetype detection
Christian Brabandt <cb@256bit.org>
parents: 11459
diff changeset
723 endfor
22673
67aa7507ea2e patch 8.2.1885: filetype tests unnessarily creates swap files
Bram Moolenaar <Bram@vim.org>
parents: 22557
diff changeset
724 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
725 endfunc
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
726
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
727 func Test_filetype_detection()
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
728 filetype on
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
729 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
730 if has('fname_case')
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
731 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
732 endif
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
733 filetype off
12029
a39e7e2ae7da patch 8.0.0895: filetype test fails on MS-Windows
Christian Brabandt <cb@256bit.org>
parents: 12027
diff changeset
734 endfunc
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
735
32266
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
736 " Content lines that should not result in filetype detection
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
737 let s:false_positive_checks = {
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
738 \ '': [['test execve("/usr/bin/pstree", ["pstree"], 0x7ff0 /* 63 vars */) = 0']],
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
739 \ }
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
740
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
741 " 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
742 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
743 \ 'virata': [['% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
744 \ ['', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
745 \ ['', '', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
746 \ ['', '', '', '% Virata'],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
747 \ ['', '', '', '', '% Virata']],
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
748 \ '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
749 \ ['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
750 \ ['__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
751 \ '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
752 \ 'scala': [['#!/path/scala']],
31203
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
753 \ 'sh': [['#!/path/sh'],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
754 \ ['#!/path/bash'],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
755 \ ['#!/path/bash2'],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
756 \ ['#!/path/dash'],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
757 \ ['#!/path/ksh'],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
758 \ ['#!/path/ksh93']],
8a54e866a5db patch 9.0.0935: when using dash it may not be recognize as filetype "sh"
Bram Moolenaar <Bram@vim.org>
parents: 31196
diff changeset
759 \ 'csh': [['#!/path/csh']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
760 \ '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
761 \ '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
762 \ '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
763 \ ['#!/path/wish'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
764 \ ['#!/path/expectk'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
765 \ ['#!/path/itclsh'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
766 \ ['#!/path/itkwish']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
767 \ '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
768 \ '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
769 \ '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
770 \ '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
771 \ ['#!/path/pike0'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
772 \ ['#!/path/pike9']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
773 \ '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
774 \ '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
775 \ '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
776 \ 'php': [['#!/path/php']],
13182
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
777 \ 'python': [['#!/path/python'],
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
778 \ ['#!/path/python2'],
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
779 \ ['#!/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
780 \ '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
781 \ '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
782 \ 'javascript': [['#!/path/node'],
13182
181ddaf5e467 patch 8.0.1465: python2 and python3 detection not tested
Christian Brabandt <cb@256bit.org>
parents: 13168
diff changeset
783 \ ['#!/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
784 \ ['#!/path/nodejs'],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
785 \ ['#!/path/rhino']],
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
786 \ '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
787 \ '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
788 \ 'ocaml': [['#!/path/ocaml']],
21817
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
789 \ 'awk': [['#!/path/awk'],
c2c2e57562ee patch 8.2.1458: .gawk files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 21719
diff changeset
790 \ ['#!/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
791 \ 'wml': [['#!/path/wml']],
29397
7f5db9decf32 patch 9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Bram Moolenaar <Bram@vim.org>
parents: 29338
diff changeset
792 \ 'scheme': [['#!/path/scheme'],
7f5db9decf32 patch 9.0.0041: a couple of filetype patterns do not have "*" before "/etc"
Bram Moolenaar <Bram@vim.org>
parents: 29338
diff changeset
793 \ ['#!/path/guile']],
13168
9d638acf7cf7 patch 8.0.1458: filetype detection test does not check all scripts
Christian Brabandt <cb@256bit.org>
parents: 13128
diff changeset
794 \ '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
795 \ '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
796 \ '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
797 \ '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
798 \ ['// -*- 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
799 \ '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
800 \ 'pascal': [['#!/path/instantfpc']],
23701
c5b5e7520fe2 patch 8.2.2392: fennel filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23685
diff changeset
801 \ 'fennel': [['#!/path/fennel']],
26131
87d8f52d3821 patch 8.2.3598: RouterOS filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25971
diff changeset
802 \ 'routeros': [['#!/path/rsc']],
26141
77ad8ea01c00 patch 8.2.3603: fish filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 26133
diff changeset
803 \ '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
804 \ 'forth': [['#!/path/gforth']],
29181
71759abd2145 patch 8.2.5110: icon filetype not recognized from the first line
Bram Moolenaar <Bram@vim.org>
parents: 29064
diff changeset
805 \ 'icon': [['#!/path/icon']],
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
806 \ }
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
807
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
808 " 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
809 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
810 \ '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
811 \ '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
812 \ '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
813 \ '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
814 \ '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
815 \ '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
816 \ }
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
817
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
818 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
819 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
820 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
821 for file in files
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
822 call writefile(file, 'Xtest', 'D')
12255
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
823 split Xtest
12688
a6a935b3270e patch 8.0.1222: test functions interfere with each other
Christian Brabandt <cb@256bit.org>
parents: 12255
diff changeset
824 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
825 bwipe!
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
826 endfor
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
827 endfor
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
828 filetype off
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
829 endfunc
d5710baf5cf7 patch 8.0.1007: no test for filetype detection for scripts
Christian Brabandt <cb@256bit.org>
parents: 12052
diff changeset
830
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
831 func Test_script_detection()
32266
769df9d385e0 patch 9.0.1464: strace filetype detection is expensive
Bram Moolenaar <Bram@vim.org>
parents: 32248
diff changeset
832 call Run_script_detection(s:false_positive_checks)
20756
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
833 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
834 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
835 endfunc
33a14786a0e4 patch 8.2.0930: script filetype detection trips over env -S argument
Bram Moolenaar <Bram@vim.org>
parents: 20749
diff changeset
836
15097
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14991
diff changeset
837 func Test_setfiletype_completion()
1946487c74ba patch 8.1.0559: command line completion not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 14991
diff changeset
838 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
839 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
840 endfunc
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
841
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
842 " 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
843 func Test_emptybuf_ftdetect()
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
844 new
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
845 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
846 call assert_equal('', &filetype)
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
847 filetype detect
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
848 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
849 close!
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
850 endfunc
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
851
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
852 " 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
853 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
854 new Xtest.vim
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
855 filetype indent on
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
856 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
857 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
858 \ 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
859 filetype indent off
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
860 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
861 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
862 \ 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
863 close
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
864 endfunc
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
865
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
866 """""""""""""""""""""""""""""""""""""""""""""""""
28483
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
867 " 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
868 " Keep sorted.
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
869 """""""""""""""""""""""""""""""""""""""""""""""""
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
870
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
871 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
872 filetype on
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
873
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
874 call writefile(['looks like BASIC'], 'Xfile.bas', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
875 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
876 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
877 bwipe!
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
878
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
879 " 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
880
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
881 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
882 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
883 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
884 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
885 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
886
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
887 " FreeBASIC
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
888
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
889 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
890 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
891 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
892 bwipe!
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
893
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
894 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
895 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
896 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
897 bwipe!
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
898
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
899 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
900 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
901 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
902 bwipe!
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
903
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
904 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
905 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
906 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
907 bwipe!
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
908
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
909 " QB64
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
910
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
911 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
912 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
913 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
914 bwipe!
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
915
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
916 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
917 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
918 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
919 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
920
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
921 " Visual Basic
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
922
29326
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
923 call writefile(['Attribute VB_NAME = "Testing"', 'Enum Foo', 'End Enum'], 'Xfile.bas')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
924 split Xfile.bas
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
925 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
926 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
927
27420
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
928 filetype off
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
929 endfunc
978890380129 patch 8.2.4238: *.tf file could be fileytpe "tf" or "terraform"
Bram Moolenaar <Bram@vim.org>
parents: 27344
diff changeset
930
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
931 " Test dist#ft#FTcfg()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
932 func Test_cfg_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
933 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
934
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
935 " *.cfg defaults to cfg
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
936 call writefile(['looks like cfg'], 'cfgfile.cfg', 'D')
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
937 split cfgfile.cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
938 call assert_equal('cfg', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
939
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
940 let g:filetype_cfg = 'other'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
941 edit
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
942 call assert_equal('other', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
943 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
944 unlet g:filetype_cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
945
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
946 " RAPID cfg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
947 let ext = 'cfg'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
948 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
949 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
950 execute "split cfgfile." .. ext
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
951 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
952 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
953 call delete('cfgfile.' .. ext)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
954 " 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
955 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
956 endfor
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
957
28954
0a7b2b0d8c7f patch 8.2.4999: filetype test table is not properly sorted
Bram Moolenaar <Bram@vim.org>
parents: 28670
diff changeset
958 " clean up
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
959 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
960 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
961
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
962 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
963 filetype on
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
964
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
965 call writefile(['looks like D'], 'Xfile.d', 'D')
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
966 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
967 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
968 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
969
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
970 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
971 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
972 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
973 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
974
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
975 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
976 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
977 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
978 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
979
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
980 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
981 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
982 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
983 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
984
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
985 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
986 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
987 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
988 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
989
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
990 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
991 split Xfile.d
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
992 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
993 bwipe!
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
994
27883
9c04fbcaacbc patch 8.2.4467: running filetype test leaves file behind
Bram Moolenaar <Bram@vim.org>
parents: 27881
diff changeset
995 " clean up
27877
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
996 filetype off
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
997 endfunc
834d3fba1e7c patch 8.2.4464: Dtrace files are recognized as filetype D
Bram Moolenaar <Bram@vim.org>
parents: 27796
diff changeset
998
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
999 func Test_dat_file()
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1000 filetype on
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1001
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
1002 " 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
1003 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
1004 split datfile.dat
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1005 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
1006 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1007 call delete('datfile.dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1008
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
1009 " 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
1010 " sensitive.
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1011 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
1012 split datfile.Dat
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1013 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
1014 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1015 call delete('datfile.Dat')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1016
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
1017 " 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
1018 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
1019 split datfile.DAT
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1020 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
1021 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
1022
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1023 " 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
1024 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
1025 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
1026 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
1027 bwipe!
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1028 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
1029 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
1030
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1031 filetype off
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1032 endfunc
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
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_dep3patch_file()
23078
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
1035 filetype on
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
1036
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1037 call assert_true(mkdir('debian/patches', 'pR'))
23078
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
1038
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1039 " 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
1040 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
1041 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
1042 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
1043 bwipe!
d01b011f91b9 patch 8.2.2085: Qt translation file is recognized as typescript
Bram Moolenaar <Bram@vim.org>
parents: 22989
diff changeset
1044
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1045 " 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
1046 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
1047 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
1048 call assert_equal('diff', &filetype)
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
1049 bwipe!
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
1050
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1051 " 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
1052 " 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
1053 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
1054 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
1055 call assert_equal('dep3patch', &filetype)
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
1056 bwipe!
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
1057
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1058 " 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
1059 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
1060 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
1061 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
1062 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
1063 bwipe!
23685
eb30aed2059f patch 8.2.2384: turtle filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 23636
diff changeset
1064
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1065 " 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
1066 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
1067 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
1068 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
1069 bwipe!
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1070 endfunc
23584
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1071
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1072 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
1073 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1074
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1075 call writefile([' <!doctype dsssl-spec ['], 'dslfile.dsl', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1076 split dslfile.dsl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1077 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
1078 bwipe!
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1079
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1080 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
1081 split dslfile.dsl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1082 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
1083 bwipe!
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1084
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1085 filetype off
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1086 endfunc
397f95f103e8 patch 8.2.2334: Pascal-like filetypes not always detected
Bram Moolenaar <Bram@vim.org>
parents: 23430
diff changeset
1087
25026
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1088 func Test_ex_file()
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1089 filetype on
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1090
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1091 call writefile(['arbitrary content'], 'Xfile.ex', 'D')
25026
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1092 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1093 call assert_equal('elixir', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1094 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1095 let g:filetype_euphoria = 'euphoria4'
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1096 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1097 call assert_equal('euphoria4', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1098 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1099 unlet g:filetype_euphoria
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1100
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1101 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
1102 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1103 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1104 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1105
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1106 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
1107 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1108 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1109 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1110
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1111 call writefile(['ifdef '], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1112 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1113 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1114 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1115
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1116 call writefile(['include '], 'Xfile.ex')
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1117 split Xfile.ex
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1118 call assert_equal('euphoria3', &filetype)
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1119 bwipe!
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1120
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1121 filetype off
fda44c0b4b7b patch 8.2.3050: cannot recognize elixir files
Bram Moolenaar <Bram@vim.org>
parents: 25024
diff changeset
1122 endfunc
21008
2cf49849e933 patch 8.2.1055: no filetype set for pacman config files
Bram Moolenaar <Bram@vim.org>
parents: 20986
diff changeset
1123
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1124 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
1125 filetype on
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1126 call assert_true(mkdir('0', 'pR'))
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1127 call assert_true(mkdir('0.orig', 'pR'))
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1128
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1129 call writefile(['FoamFile {', ' object something;'], 'Xfile1Dict', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1130 split Xfile1Dict
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1131 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
1132 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1133
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1134 call writefile(['FoamFile {', ' object something;'], 'Xfile1Dict.something', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1135 split Xfile1Dict.something
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1136 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
1137 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1138
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1139 call writefile(['FoamFile {', ' object something;'], 'XfileProperties', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1140 split XfileProperties
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1141 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
1142 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1143
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1144 call writefile(['FoamFile {', ' object something;'], 'XfileProperties.something', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1145 split XfileProperties.something
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1146 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
1147 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1148
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1149 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
1150 split XfileProperties
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('foam', &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(['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
1155 split XfileProperties.something
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('foam', &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(['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
1160 split 0/Xfile
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('foam', &filetype)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1162 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1163
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1164 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
1165 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
1166 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
1167 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1168
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1169 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1170 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1171
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1172 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
1173 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1174
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1175 call writefile(['looks like FORM'], 'Xfile.frm', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1176 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1177 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
1178 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1179
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1180 " 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
1181
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1182 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
1183 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1184 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
1185 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1186 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
1187
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1188 " Visual Basic
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1189
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1190 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
1191 split Xfile.frm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1192 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
1193 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1194
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1195 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1196 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1197
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1198 func Test_fs_file()
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1199 filetype on
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1200
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1201 call writefile(['looks like F#'], 'Xfile.fs', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1202 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1203 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
1204 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1205
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1206 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
1207 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1208 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
1209 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1210 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
1211
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1212 " 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
1213
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1214 " Forth (Gforth)
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1215
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1216 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
1217 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1218 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
1219 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1220
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1221 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
1222 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1223 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
1224 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1225
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1226 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
1227 split Xfile.fs
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1228 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
1229 bwipe!
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1230
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1231 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1232 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1233
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1234 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
1235 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1236
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1237 call assert_true(mkdir('Xrepo.git', 'pR'))
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1238
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1239 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
1240 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
1241 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
1242 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1243
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1244 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
1245 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
1246 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
1247 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1248
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1249 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
1250 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
1251 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
1252 bwipe!
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1253
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1254 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
1255 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
1256 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
1257 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1258
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1259 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1260 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1261
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1262 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
1263 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1264
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1265 call writefile(['[Trigger]', 'this is pacman config'], 'Xfile.hook', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1266 split Xfile.hook
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
1267 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
1268 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1269
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1270 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
1271 split Xfile.hook
28507
73f235d0b6c8 patch 8.2.4778: pacman files use dosini filetype
Bram Moolenaar <Bram@vim.org>
parents: 28485
diff changeset
1272 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
1273 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1274
25644
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1275 filetype off
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1276 endfunc
59a1c9a2ca2e patch 8.2.3358: structurizr files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25497
diff changeset
1277
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1278 func Test_m_file()
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1279 filetype on
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1280
30572
d77e208d611d patch 9.0.0621: filetype test leaves file behind
Bram Moolenaar <Bram@vim.org>
parents: 30552
diff changeset
1281 call writefile(['looks like Matlab'], 'Xfile.m', 'D')
25727
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('matlab', &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
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1286 let g:filetype_m = 'octave'
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1287 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1288 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1289 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1290 unlet g:filetype_m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1291
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1292 " Test dist#ft#FTm()
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1293
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1294 " Objective-C
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1295
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1296 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
1297 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1298 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1299 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1300
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1301 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
1302 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1303 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1304 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1305
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1306 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
1307 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1308 call assert_equal('objc', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1309 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1310
26296
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1311 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
1312 split Xfile.m
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1313 call assert_equal('objc', &filetype)
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1314 bwipe!
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1315
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1316 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
1317 split Xfile.m
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1318 call assert_equal('objc', &filetype)
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1319 bwipe!
9f32ccdadd22 patch 8.2.3679: objc file detected as Octave
Bram Moolenaar <Bram@vim.org>
parents: 26143
diff changeset
1320
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1321 " Octave
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1322
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1323 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
1324 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1325 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1326 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1327
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1328 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
1329 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1330 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1331 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1332
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1333 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
1334 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1335 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1336 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1337
25794
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1338 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
1339 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1340 call assert_equal('octave', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1341 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1342
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1343 " Mathematica
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1344
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1345 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
1346 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1347 call assert_equal('mma', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1348 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1349
25794
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1350 " MATLAB
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1351
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1352 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
1353 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
1354 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
1355 bwipe!
374adc90efa5 patch 8.2.3432: octave/Matlab filetype detection does not work properly
Bram Moolenaar <Bram@vim.org>
parents: 25727
diff changeset
1356
25727
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1357 " Murphi
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1358
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1359 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
1360 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1361 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1362 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1363
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1364 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
1365 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1366 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1367 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1368
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1369 call writefile(['Type'], 'Xfile.m')
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1370 split Xfile.m
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1371 call assert_equal('murphi', &filetype)
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1372 bwipe!
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1373
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1374 filetype off
71d3ebfb00b6 patch 8.2.3399: Octave files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 25676
diff changeset
1375 endfunc
25915
36f2c43bd671 patch 8.2.3491: xpm2 filetype dection is not so good
Bram Moolenaar <Bram@vim.org>
parents: 25878
diff changeset
1376
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1377 func Test_mod_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1378 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1379
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1380 " *.mod defaults to Modsim III
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1381 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
1382 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1383 call assert_equal('modsim3', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1384 bwipe!
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 " 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
1387 let g:filetype_mod = 'lprolog'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1388 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1389 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1390 unlet g:filetype_mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1391 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1392
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1393 " RAPID header start with a line containing only "%%%",
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1394 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1395 call writefile(['%%%'], 'modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1396 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1397 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1398 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1399 call delete('modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1400
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1401 " 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
1402 " 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
1403 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
1404 split modfile.Mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1405 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1406 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1407 call delete('modfile.Mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1408
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1409 " RAPID is not case sensitive, embedded spaces, sysmodule,
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1410 " 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
1411 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
1412 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1413 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1414 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1415
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1416 " 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
1417 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
1418 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1419 call assert_equal('modula2', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1420 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1421
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1422 " 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
1423 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
1424 split modfile.MOD
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1425 call assert_equal('modula2', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1426 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1427 call delete('modfile.MOD')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1428
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1429 " LambdaProlog module
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1430 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
1431 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1432 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1433 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1434
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1435 " 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
1436 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
1437 split modfile.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1438 call assert_equal('lprolog', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1439 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1440 call delete('modfile.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1441
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1442 " go.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1443 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
1444 split go.mod
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1445 call assert_equal('gomod', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1446 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1447 call delete('go.mod')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1448
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1449 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1450 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1451
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1452 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
1453 filetype on
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1454
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1455 call writefile([], 'Xfile.patch', 'D')
26970
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1456 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
1457 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
1458 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1459
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1460 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
1461 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
1462 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
1463 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1464
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1465 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
1466 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
1467 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
1468 bwipe!
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1469
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1470 filetype off
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1471 endfunc
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1472
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1473 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
1474 filetype on
733295e9d755 patch 8.2.4014: git and gitcommit file types not properly recognized
Bram Moolenaar <Bram@vim.org>
parents: 26933
diff changeset
1475
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1476 " 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
1477 let lines =<< trim END
27070
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1478
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1479 use a
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1480 END
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1481 call writefile(lines, "Xfile.t", 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1482 split Xfile.t
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1483 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
1484 bwipe
27070
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1485
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1486 filetype off
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1487 endfunc
b353bd9faec8 patch 8.2.4064: foam files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 27008
diff changeset
1488
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1489 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
1490 filetype on
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1491
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1492 call writefile(['looks like puppet'], 'Xfile.pp', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1493 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1494 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
1495 bwipe!
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1496
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1497 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
1498 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1499 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
1500 bwipe!
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1501 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
1502
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1503 " 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
1504 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
1505 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1506 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
1507 bwipe!
9f72ec92d361 patch 8.2.4172: filetype detection for BASIC is not optimal
Bram Moolenaar <Bram@vim.org>
parents: 27132
diff changeset
1508
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1509 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
1510 split Xfile.pp
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1511 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
1512 bwipe!
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1513
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1514 filetype off
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1515 endfunc
3af3dee7e5d9 patch 8.2.4274: Basic and form filetype detection is incomplete
Bram Moolenaar <Bram@vim.org>
parents: 27445
diff changeset
1516
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1517 " Test dist#ft#FTprg()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1518 func Test_prg_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1519 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1520
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1521 " *.prg defaults to clipper
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1522 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
1523 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1524 call assert_equal('clipper', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1525 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1526
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1527 " 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
1528 let g:filetype_prg = 'eviews'
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1529 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1530 call assert_equal('eviews', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1531 unlet g:filetype_prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1532 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1533
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1534 " RAPID header start with a line containing only "%%%",
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1535 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1536 call writefile(['%%%'], 'prgfile.prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1537 split prgfile.prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1538 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1539 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1540 call delete('prgfile.prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1541
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1542 " 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
1543 " 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
1544 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
1545 split prgfile.Prg
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1546 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1547 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1548 call delete('prgfile.Prg')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1549
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1550 " RAPID is not case sensitive, embedded spaces, sysmodule,
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1551 " 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
1552 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
1553 split prgfile.PRG
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1554 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1555 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1556 call delete('prgfile.PRG')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1557
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1558 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1559 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1560
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1561 " Test dist#ft#FTsc()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1562 func Test_sc_file()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1563 filetype on
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1564
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1565 " SC classes are defined with '+ Class {}'
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1566 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
1567 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1568 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1569 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1570 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1571
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1572 " 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
1573 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
1574 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1575 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1576 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1577 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1578
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1579 " 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
1580 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
1581 split srcfile.sc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1582 call assert_equal('supercollider', &filetype)
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1583 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1584 call delete('srcfile.sc')
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1585
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1586 filetype off
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1587 endfunc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1588
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1589 " Test dist#ft#FTscd()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1590 func Test_scd_file()
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1591 filetype on
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1592
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1593 call writefile(['ijq(1)'], 'srcfile.scd', 'D')
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1594 split srcfile.scd
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1595 call assert_equal('scdoc', &filetype)
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1596
28443
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1597 bwipe!
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1598 filetype off
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1599 endfunc
5896c0f6cdd7 patch 8.2.4746: supercollider filetype not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28417
diff changeset
1600
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1601 func Test_src_file()
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1602 filetype on
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1603
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
1604 " 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
1605 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
1606 split srcfile.src
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1607 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
1608 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1609 call delete('srcfile.src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1610
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
1611 " 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
1612 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
1613 split srcfile.Src
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1614 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
1615 bwipe!
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1616 call delete('srcfile.Src')
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1617
28483
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1618 " 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
1619 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
1620 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
1621 split srcfile.SRC
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1622 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
1623 bwipe!
62a0dd56466c patch 8.2.4766: KRL files using "deffct" not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28445
diff changeset
1624 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
1625
3c34cbb8882d patch 8.2.4714: using g:filetype_dat and g:filetype_src not tested
Bram Moolenaar <Bram@vim.org>
parents: 28365
diff changeset
1626 " 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
1627 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
1628 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
1629 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
1630 bwipe!
28351
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1631 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
1632 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
1633
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1634 filetype off
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1635 endfunc
1aa3460f799d patch 8.2.4701: Kuka Robot Language files not recognized
Bram Moolenaar <Bram@vim.org>
parents: 28277
diff changeset
1636
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1637 func Test_sys_file()
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1638 filetype on
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1639
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1640 " *.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
1641 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
1642 split sysfile.sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1643 call assert_equal('bat', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1644 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1645
28445
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1646 " 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
1647 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
1648 split sysfile.sys
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1649 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
1650 unlet g:filetype_sys
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1651 bwipe!
7f0ec490d608 patch 8.2.4747: no filetype override for .sys files
Bram Moolenaar <Bram@vim.org>
parents: 28443
diff changeset
1652
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1653 " RAPID header start with a line containing only "%%%",
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1654 " but is not always present.
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1655 call writefile(['%%%'], 'sysfile.sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1656 split sysfile.sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1657 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1658 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1659 call delete('sysfile.sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1660
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1661 " 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
1662 " 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
1663 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
1664 split sysfile.Sys
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1665 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1666 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1667 call delete('sysfile.Sys')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1668
30182
4d3c7b4927f2 patch 9.0.0427: Drupal theme files are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30176
diff changeset
1669 " RAPID is not case sensitive, embedded spaces, sysmodule,
28390
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1670 " 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
1671 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
1672 split sysfile.SYS
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1673 call assert_equal('rapid', &filetype)
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1674 bwipe!
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1675 call delete('sysfile.SYS')
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1676
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1677 filetype off
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1678 endfunc
cc4d3ded4004 patch 8.2.0003: Build file dependencies are incomplete
Bram Moolenaar <Bram@vim.org>
parents: 28380
diff changeset
1679
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1680 func Test_tex_file()
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1681 filetype on
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1682
31575
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1683 call writefile(['%& pdflatex'], 'Xfile.tex')
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1684 split Xfile.tex
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1685 call assert_equal('tex', &filetype)
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1686 bwipe
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1687
31575
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1688 call writefile(['\newcommand{\test}{some text}'], 'Xfile.tex')
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1689 split Xfile.tex
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1690 call assert_equal('tex', &filetype)
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1691 bwipe
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1692
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1693 " tex_flavor is unset
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1694 call writefile(['%& plain'], 'Xfile.tex')
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1695 split Xfile.tex
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1696 call assert_equal('plaintex', &filetype)
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1697 bwipe
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1698
31575
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1699 let g:tex_flavor = 'plain'
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1700 call writefile(['just some text'], 'Xfile.tex')
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1701 split Xfile.tex
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1702 call assert_equal('plaintex', &filetype)
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1703 bwipe
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1704
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1705 let lines =<< trim END
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1706 % This is a comment.
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1707
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1708 \usemodule[translate]
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1709 END
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1710 call writefile(lines, 'Xfile.tex')
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1711 split Xfile.tex
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1712 call assert_equal('context', &filetype)
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1713 bwipe
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1714
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1715 let g:tex_flavor = 'context'
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1716 call writefile(['just some text'], 'Xfile.tex')
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1717 split Xfile.tex
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1718 call assert_equal('context', &filetype)
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1719 bwipe
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1720 unlet g:tex_flavor
60fe50450ee5 patch 9.0.1120: tex filetype detection not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents: 31547
diff changeset
1721
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1722 call delete('Xfile.tex')
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1723 filetype off
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1724 endfunc
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1725
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1726 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
1727 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1728
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1729 call writefile([';;; TF MUD client is super duper cool'], 'Xfile.tf', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1730 split Xfile.tf
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1731 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
1732 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1733
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1734 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
1735 split Xfile.tf
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1736 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
1737 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1738
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1739 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1740 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1741
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1742 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
1743 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1744
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1745 call writefile(['<?xml version="1.0" encoding="utf-8"?>'], 'Xfile.ts', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1746 split Xfile.ts
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1747 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
1748 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1749
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1750 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
1751 split Xfile.ts
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1752 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
1753 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1754
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1755 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1756 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1757
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1758 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
1759 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1760
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1761 call writefile(['@base <http://example.org/> .'], 'Xfile.ttl', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1762 split Xfile.ttl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1763 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
1764 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1765
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1766 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
1767 split Xfile.ttl
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1768 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
1769 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1770
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1771 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1772 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1773
32292
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1774 func Test_v_file()
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1775 filetype on
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1776
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1777 call writefile(['module tb; // Looks like a Verilog'], 'Xfile.v', 'D')
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1778 split Xfile.v
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1779 call assert_equal('verilog', &filetype)
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1780 bwipe!
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1781
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1782 call writefile(['module main'], 'Xfile.v')
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1783 split Xfile.v
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1784 call assert_equal('v', &filetype)
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1785 bwipe!
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1786
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1787 call writefile(['Definition x := 10. (*'], 'Xfile.v')
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1788 split Xfile.v
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1789 call assert_equal('coq', &filetype)
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1790 bwipe!
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1791
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1792 filetype off
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1793 endfunc
91bb2a8cc866 patch 9.0.1478: filetypes for *.v files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 32288
diff changeset
1794
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1795 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
1796 filetype on
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1797
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1798 call writefile(['this is XPM2'], 'file.xpm', 'D')
27559
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1799 split file.xpm
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1800 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
1801 bwipe!
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1802
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1803 filetype off
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1804 endfunc
663dece3743a patch 8.2.4306: no test for fixed perl filetype check
Bram Moolenaar <Bram@vim.org>
parents: 27557
diff changeset
1805
29326
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1806 func Test_cls_file()
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1807 filetype on
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1808
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1809 call writefile(['looks like Smalltalk'], 'Xfile.cls', 'D')
29326
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1810 split Xfile.cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1811 call assert_equal('st', &filetype)
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1812 bwipe!
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1813
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1814 " Test dist#ft#FTcls()
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1815
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1816 let g:filetype_cls = 'vb'
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1817 split Xfile.cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1818 call assert_equal('vb', &filetype)
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1819 bwipe!
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1820 unlet g:filetype_cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1821
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1822 " TeX
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1823
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1824 call writefile(['%'], 'Xfile.cls')
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1825 split Xfile.cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1826 call assert_equal('tex', &filetype)
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1827 bwipe!
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1828
30873
d4c8fdaa3ae7 patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Bram Moolenaar <Bram@vim.org>
parents: 30835
diff changeset
1829 call writefile(['\NeedsTeXFormat{LaTeX2e}'], 'Xfile.cls')
d4c8fdaa3ae7 patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Bram Moolenaar <Bram@vim.org>
parents: 30835
diff changeset
1830 split Xfile.cls
d4c8fdaa3ae7 patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Bram Moolenaar <Bram@vim.org>
parents: 30835
diff changeset
1831 call assert_equal('tex', &filetype)
d4c8fdaa3ae7 patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Bram Moolenaar <Bram@vim.org>
parents: 30835
diff changeset
1832 bwipe!
d4c8fdaa3ae7 patch 9.0.0771: cannot always tell the difference beween tex and rexx files
Bram Moolenaar <Bram@vim.org>
parents: 30835
diff changeset
1833
29326
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1834 " Rexx
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1835
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1836 call writefile(['# rexx'], 'Xfile.cls')
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1837 split Xfile.cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1838 call assert_equal('rexx', &filetype)
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1839 bwipe!
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1840
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1841 " Visual Basic
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1842
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1843 call writefile(['VERSION 1.0 CLASS'], 'Xfile.cls')
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1844 split Xfile.cls
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1845 call assert_equal('vb', &filetype)
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1846 bwipe!
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1847
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1848 filetype off
1f1d99bba06c patch 9.0.0006: not all Visual Basic files are recognized
Bram Moolenaar <Bram@vim.org>
parents: 29324
diff changeset
1849 endfunc
27557
ce72087b601f patch 8.2.4305: tex filetype detection fails
Bram Moolenaar <Bram@vim.org>
parents: 27493
diff changeset
1850
29338
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1851 func Test_sig_file()
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1852 filetype on
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1853
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1854 call writefile(['this is neither Lambda Prolog nor SML'], 'Xfile.sig', 'D')
29338
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1855 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1856 call assert_equal('', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1857 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1858
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1859 " Test dist#ft#FTsig()
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1860
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1861 let g:filetype_sig = 'sml'
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1862 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1863 call assert_equal('sml', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1864 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1865 unlet g:filetype_sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1866
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1867 " Lambda Prolog
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1868
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1869 call writefile(['sig foo.'], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1870 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1871 call assert_equal('lprolog', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1872 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1873
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1874 call writefile(['/* ... */'], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1875 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1876 call assert_equal('lprolog', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1877 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1878
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1879 call writefile(['% ...'], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1880 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1881 call assert_equal('lprolog', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1882 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1883
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1884 " SML signature file
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1885
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1886 call writefile(['signature FOO ='], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1887 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1888 call assert_equal('sml', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1889 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1890
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1891 call writefile(['structure FOO ='], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1892 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1893 call assert_equal('sml', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1894 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1895
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1896 call writefile(['(* ... *)'], 'Xfile.sig')
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1897 split Xfile.sig
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1898 call assert_equal('sml', &filetype)
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1899 bwipe!
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1900
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1901 filetype off
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1902 endfunc
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
1903
30023
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1904 " Test dist#ft#FTsil()
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1905 func Test_sil_file()
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1906 filetype on
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1907
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1908 split Xfile.sil
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1909 call assert_equal('sil', &filetype)
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1910 bwipe!
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1911
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1912 let lines =<< trim END
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1913 // valid
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1914 let protoErasedPathA = \ABCProtocol.a
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1915
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1916 // also valid
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1917 let protoErasedPathA =
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1918 \ABCProtocol.a
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1919 END
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1920 call writefile(lines, 'Xfile.sil', 'D')
30023
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1921
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1922 split Xfile.sil
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1923 call assert_equal('sil', &filetype)
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1924 bwipe!
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1925
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1926 " SILE
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1927
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1928 call writefile(['% some comment'], 'Xfile.sil')
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1929 split Xfile.sil
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1930 call assert_equal('sile', &filetype)
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1931 bwipe!
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1932
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1933 call writefile(['\begin[papersize=a6]{document}foo\end{document}'], 'Xfile.sil')
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1934 split Xfile.sil
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1935 call assert_equal('sile', &filetype)
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1936 bwipe!
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1937
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1938 filetype off
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1939 endfunc
87063bfe81cd patch 9.0.0349: filetype of *.sil files not well detected
Bram Moolenaar <Bram@vim.org>
parents: 29962
diff changeset
1940
29427
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1941 func Test_inc_file()
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1942 filetype on
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1943
30552
a7a9e8b9af89 patch 9.0.0611: tests delete files with a separate delete() call
Bram Moolenaar <Bram@vim.org>
parents: 30537
diff changeset
1944 call writefile(['this is the fallback'], 'Xfile.inc', 'D')
29427
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1945 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1946 call assert_equal('pov', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1947 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1948
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1949 let g:filetype_inc = 'foo'
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1950 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1951 call assert_equal('foo', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1952 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1953 unlet g:filetype_inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1954
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1955 " aspperl
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1956 call writefile(['perlscript'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1957 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1958 call assert_equal('aspperl', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1959 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1960
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1961 " aspvbs
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1962 call writefile(['<% something'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1963 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1964 call assert_equal('aspvbs', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1965 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1966
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1967 " php
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1968 call writefile(['<?php'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1969 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1970 call assert_equal('php', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1971 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1972
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1973 " pascal
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1974 call writefile(['program'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1975 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1976 call assert_equal('pascal', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1977 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1978
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1979 " bitbake
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1980 call writefile(['require foo'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1981 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1982 call assert_equal('bitbake', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1983 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
1984
29493
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1985 call writefile(['S = "${WORKDIR}"'], 'Xfile.inc')
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1986 split Xfile.inc
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1987 call assert_equal('bitbake', &filetype)
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1988 bwipe!
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1989
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1990 call writefile(['DEPENDS:append = " somedep"'], 'Xfile.inc')
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1991 split Xfile.inc
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1992 call assert_equal('bitbake', &filetype)
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1993 bwipe!
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1994
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1995 call writefile(['MACHINE ??= "qemu"'], 'Xfile.inc')
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1996 split Xfile.inc
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1997 call assert_equal('bitbake', &filetype)
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1998 bwipe!
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
1999
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2000 call writefile(['PROVIDES := "test"'], 'Xfile.inc')
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2001 split Xfile.inc
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2002 call assert_equal('bitbake', &filetype)
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2003 bwipe!
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2004
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2005 call writefile(['RDEPENDS_${PN} += "bar"'], 'Xfile.inc')
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2006 split Xfile.inc
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2007 call assert_equal('bitbake', &filetype)
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2008 bwipe!
6c1e06abff2c patch 9.0.0088: pattern for detecting bitbake files is not sufficient
Bram Moolenaar <Bram@vim.org>
parents: 29485
diff changeset
2009
29427
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2010 " asm
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2011 call writefile(['asmsyntax=foo'], 'Xfile.inc')
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2012 split Xfile.inc
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2013 call assert_equal('foo', &filetype)
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2014 bwipe!
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2015
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2016 filetype off
2830faa3e100 patch 9.0.0055: bitbake files are not detected
Bram Moolenaar <Bram@vim.org>
parents: 29415
diff changeset
2017 endfunc
29338
f4f531986753 patch 9.0.0012: signature files not detected properly
Bram Moolenaar <Bram@vim.org>
parents: 29326
diff changeset
2018
30890
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2019 func Test_lsl_file()
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2020 filetype on
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2021
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2022 call writefile(['looks like Linden Scripting Language'], 'Xfile.lsl', 'D')
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2023 split Xfile.lsl
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2024 call assert_equal('lsl', &filetype)
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2025 bwipe!
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2026
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2027 " Test dist#ft#FTlsl()
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2028
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2029 let g:filetype_lsl = 'larch'
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2030 split Xfile.lsl
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2031 call assert_equal('larch', &filetype)
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2032 bwipe!
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2033 unlet g:filetype_lsl
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2034
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2035 " Larch Shared Language
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2036
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2037 call writefile(['% larch comment'], 'Xfile.lsl')
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2038 split Xfile.lsl
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2039 call assert_equal('larch', &filetype)
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2040 bwipe!
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2041
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2042 call writefile(['foo: trait'], 'Xfile.lsl')
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2043 split Xfile.lsl
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2044 call assert_equal('larch', &filetype)
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2045 bwipe!
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2046
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2047 filetype off
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2048 endfunc
ebcaf6bbb410 patch 9.0.0779: lsl and lm3 file extensions are not recognized
Bram Moolenaar <Bram@vim.org>
parents: 30873
diff changeset
2049
32415
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2050 func Test_typ_file()
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2051 filetype on
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2052
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2053 " SQL type file
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2054
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2055 call writefile(['CASE = LOWER'], 'Xfile.typ', 'D')
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2056 split Xfile.typ
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2057 call assert_equal('sql', &filetype)
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2058 bwipe!
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2059
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2060 call writefile(['TYPE foo'], 'Xfile.typ')
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2061 split Xfile.typ
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2062 call assert_equal('sql', &filetype)
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2063 bwipe!
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2064
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2065 " typst document
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2066
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2067 call writefile(['this is a fallback'], 'Xfile.typ')
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2068 split Xfile.typ
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2069 call assert_equal('typst', &filetype)
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2070 bwipe!
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2071
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2072 let g:filetype_typ = 'typst'
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2073 split test.typ
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2074 call assert_equal('typst', &filetype)
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2075 bwipe!
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2076 unlet g:filetype_typ
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2077
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2078 filetype off
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2079 endfunc
8d7214baf422 patch 9.0.1539: typst filetype is not recognized
Bram Moolenaar <Bram@vim.org>
parents: 32343
diff changeset
2080
19425
67fbe280a502 patch 8.2.0270: some code not covered by tests
Bram Moolenaar <Bram@vim.org>
parents: 19263
diff changeset
2081 " vim: shiftwidth=2 sts=2 expandtab