Mercurial > vim
view src/testdir/test_filetype.vim @ 11510:deb9295dccda v8.0.0638
patch 8.0.0638: cannot build with new MSVC version
commit https://github.com/vim/vim/commit/d7383881c8e9f474a909b54b21abb0aa2b412ba2
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jun 13 15:22:12 2017 +0200
patch 8.0.0638: cannot build with new MSVC version
Problem: Cannot build with new MSVC version VS2017.
Solution: Change the compiler arguments. (Leonardo Manera, closes https://github.com/vim/vim/issues/1731,
closes #1747)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 13 Jun 2017 15:30:03 +0200 |
parents | 561b76ed9d12 |
children | c2aa4af29251 |
line wrap: on
line source
" Test :setfiletype func Test_detection() filetype on augroup filetypedetect au BufNewFile,BufRead * call assert_equal(1, did_filetype()) augroup END new something.vim call assert_equal('vim', &filetype) bwipe! filetype off endfunc func Test_conf_type() filetype on call writefile(['# some comment', 'must be conf'], 'Xfile') augroup filetypedetect au BufNewFile,BufRead * call assert_equal(0, did_filetype()) augroup END split Xfile call assert_equal('conf', &filetype) bwipe! call delete('Xfile') filetype off endfunc func Test_other_type() filetype on augroup filetypedetect au BufNewFile,BufRead * call assert_equal(0, did_filetype()) au BufNewFile,BufRead Xfile setf testfile au BufNewFile,BufRead * call assert_equal(1, did_filetype()) augroup END call writefile(['# some comment', 'must be conf'], 'Xfile') split Xfile call assert_equal('testfile', &filetype) bwipe! call delete('Xfile') filetype off endfunc