Mercurial > vim
changeset 21491:e3c1e12f062c v8.2.1296
patch 8.2.1296: some part of using 'smarcase' was not tested
Commit: https://github.com/vim/vim/commit/d66cdcd43a598825add743bc95642cd8ed705252
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jul 26 13:27:16 2020 +0200
patch 8.2.1296: some part of using 'smarcase' was not tested
Problem: Some part of using 'smarcase' was not tested.
Solution: Add more tests. (Dominique Pell?, closes https://github.com/vim/vim/issues/6538)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 26 Jul 2020 13:30:04 +0200 |
parents | 59375f23e24b |
children | fb81749507a4 |
files | src/testdir/test_search.vim src/version.c |
diffstat | 2 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_search.vim +++ b/src/testdir/test_search.vim @@ -608,7 +608,7 @@ func Test_search_cmdline6() endfunc func Test_search_cmdline7() - " Test that an pressing <c-g> in an empty command line + " Test that pressing <c-g> in an empty command line " does not move the cursor CheckOption incsearch @@ -1642,6 +1642,25 @@ func Test_search_smartcase() set ignorecase& smartcase& close! +endfun + +" Test 'smartcase' with utf-8. +func Test_search_smartcase_utf8() + new + let save_enc = &encoding + set encoding=utf8 ignorecase smartcase + + call setline(1, 'Café cafÉ') + 1s/café/x/g + call assert_equal('x x', getline(1)) + + call setline(1, 'Café cafÉ') + 1s/cafÉ/x/g + call assert_equal('Café x', getline(1)) + + set ignorecase& smartcase& + let &encoding = save_enc + close! endfunc " Test searching past the end of a file