Mercurial > vim
view src/testdir/test_makeencoding.vim @ 11287:e800e8149a5b v8.0.0529
patch 8.0.0529: line in test commented out
commit https://github.com/vim/vim/commit/13489b9c41922b9ecb16fa47564ec76641515c08
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Mar 30 22:20:29 2017 +0200
patch 8.0.0529: line in test commented out
Problem: Line in test commented out.
Solution: Uncomment the lines for character classes that were failing before
8.0.0519. (Dominique Pelle, closes #1599)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 30 Mar 2017 22:30:05 +0200 |
parents | e71d3bdf3bc3 |
children | 2dcaa860e3fc |
line wrap: on
line source
" Tests for 'makeencoding'. if !has('multi_byte') finish endif source shared.vim let s:python = PythonProg() if s:python == '' " Can't run this test. finish endif let s:script = 'test_makeencoding.py' let s:message_tbl = { \ 'utf-8': 'ÀÈÌÒÙ こんにちは 你好', \ 'latin1': 'ÀÈÌÒÙ', \ 'cp932': 'こんにちは', \ 'cp936': '你好', \} " Tests for :cgetfile and :lgetfile. func Test_getfile() set errorfile=Xerror.txt set errorformat=%f(%l)\ :\ %m " :cgetfile for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent !" . s:python . " " . s:script . " " . enc . " > " . &errorfile cgetfile copen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) cclose endfor " :lgetfile for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent !" . s:python . " " . s:script . " " . enc . " > " . &errorfile lgetfile lopen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) lclose endfor call delete(&errorfile) endfunc " Tests for :grep and :lgrep. func Test_grep() let &grepprg = s:python set grepformat=%f(%l)\ :\ %m " :grep for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent grep! " . s:script . " " . enc copen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) cclose endfor " :lgrep for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent lgrep! " . s:script . " " . enc lopen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) lclose endfor endfunc " Tests for :make and :lmake. func Test_make() let &makeprg = s:python set errorformat=%f(%l)\ :\ %m " :make for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent make! " . s:script . " " . enc copen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) cclose endfor " :lmake for enc in keys(s:message_tbl) let &makeencoding = enc exec "silent lmake! " . s:script . " " . enc lopen call assert_equal("Xfoobar.c|10| " . s:message_tbl[enc] . " (" . enc . ")", \ getline('.')) lclose endfor endfunc