summaryrefslogtreecommitdiff
path: root/src/testdir/test_search.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-05 20:59:28 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-05 20:59:28 +0100
commitfb094e14c19337de824d4e6710ca6a2617930ab0 (patch)
tree4738265336181b11c8f7bb6d5b7f41d92753a208 /src/testdir/test_search.vim
parent8fdb35a974d92c7d0267bc8988aa6af74ee6885d (diff)
downloadvim-git-fb094e14c19337de824d4e6710ca6a2617930ab0.tar.gz
patch 8.0.1271: still too many old style testsv8.0.1271
Problem: Still too many old style tests. Solution: Convert a few more tests to new style. (Yegappan Lakshmanan, closes #2290)
Diffstat (limited to 'src/testdir/test_search.vim')
-rw-r--r--src/testdir/test_search.vim15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 986b8bc78..2a660c61b 100644
--- 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