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
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