aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-06 19:18:59 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-06 19:26:33 -0500
commitc46b67333fd5ba34470166f384c0233b0696910b (patch)
tree141d2c923f8c86742850948ee7ebaa1db5ebd9df
parent7bb92b7787458d8bc6b5b84eb69986c77a7b2499 (diff)
downloadrneovim-c46b67333fd5ba34470166f384c0233b0696910b.tar.gz
rneovim-c46b67333fd5ba34470166f384c0233b0696910b.tar.bz2
rneovim-c46b67333fd5ba34470166f384c0233b0696910b.zip
vim-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 vim/vim#6538) https://github.com/vim/vim/commit/d66cdcd43a598825add743bc95642cd8ed705252
-rw-r--r--src/nvim/testdir/test_search.vim23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/nvim/testdir/test_search.vim b/src/nvim/testdir/test_search.vim
index 6824c50112..8d71ada551 100644
--- a/src/nvim/testdir/test_search.vim
+++ b/src/nvim/testdir/test_search.vim
@@ -508,7 +508,7 @@ endfunc
func Test_search_cmdline7()
throw 'skipped: Nvim does not support test_override()'
- " 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
if !exists('+incsearch')
return
@@ -1172,3 +1172,24 @@ func Test_search_special()
set t_PE=
exe "norm /\x80PS"
endfunc
+
+" 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
+
+" vim: shiftwidth=2 sts=2 expandtab