Mercurial > vim
annotate src/testdir/test_filetype.vim @ 11559:597205f1230e v8.0.0662
patch 8.0.0662: stray FIXME for fixed problem
commit https://github.com/vim/vim/commit/4670490673ed98502a09b74fbabe785b47e3d289
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 22 23:03:12 2017 +0200
patch 8.0.0662: stray FIXME for fixed problem
Problem: Stray FIXME for fixed problem.
Solution: Remove the comment. (Dominique Pelle)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 22 Jun 2017 23:15:03 +0200 |
parents | 561b76ed9d12 |
children | c2aa4af29251 |
rev | line source |
---|---|
11459
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
1 " Test :setfiletype |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
2 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
3 func Test_detection() |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
4 filetype on |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
5 augroup filetypedetect |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
6 au BufNewFile,BufRead * call assert_equal(1, did_filetype()) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
7 augroup END |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
8 new something.vim |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
9 call assert_equal('vim', &filetype) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
10 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
11 bwipe! |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
12 filetype off |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
13 endfunc |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
14 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
15 func Test_conf_type() |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
16 filetype on |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
17 call writefile(['# some comment', 'must be conf'], 'Xfile') |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
18 augroup filetypedetect |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
19 au BufNewFile,BufRead * call assert_equal(0, did_filetype()) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
20 augroup END |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
21 split Xfile |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
22 call assert_equal('conf', &filetype) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
23 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
24 bwipe! |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
25 call delete('Xfile') |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
26 filetype off |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
27 endfunc |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
28 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
29 func Test_other_type() |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
30 filetype on |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
31 augroup filetypedetect |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
32 au BufNewFile,BufRead * call assert_equal(0, did_filetype()) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
33 au BufNewFile,BufRead Xfile setf testfile |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
34 au BufNewFile,BufRead * call assert_equal(1, did_filetype()) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
35 augroup END |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
36 call writefile(['# some comment', 'must be conf'], 'Xfile') |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
37 split Xfile |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
38 call assert_equal('testfile', &filetype) |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
39 |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
40 bwipe! |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
41 call delete('Xfile') |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
42 filetype off |
561b76ed9d12
patch 8.0.0613: the conf filetype is used before ftdetect from packages
Christian Brabandt <cb@256bit.org>
parents:
diff
changeset
|
43 endfunc |