Mercurial > vim
diff src/testdir/test_search.vim @ 12788:cb9b2774f21f v8.0.1271
patch 8.0.1271: still too many old style tests
commit https://github.com/vim/vim/commit/fb094e14c19337de824d4e6710ca6a2617930ab0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Nov 5 20:59:28 2017 +0100
patch 8.0.1271: still too many old style tests
Problem: Still too many old style tests.
Solution: Convert a few more tests to new style. (Yegappan Lakshmanan,
closes #2290)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sun, 05 Nov 2017 21:00:04 +0100 |
parents | 7f27e9769f62 |
children | 3c09e451af3a |
line wrap: on
line diff
--- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -697,3 +697,18 @@ endfunc func Test_search_undefined_behaviour2() call search("\%UC0000000") endfunc + +" Test for search('multi-byte char', 'bce') +func Test_search_multibyte() + if !has('multi_byte') + return + endif + let save_enc = &encoding + set encoding=utf8 + enew! + call append('$', 'A') + call cursor(2, 1) + call assert_equal(2, search('A', 'bce', line('.'))) + enew! + let &encoding = save_enc +endfunc