Mercurial > vim
comparison src/testdir/test_search.vim @ 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 | 6a4806e326dd |
children | ff21e2962490 |
comparison
equal
deleted
inserted
replaced
21490:59375f23e24b | 21491:e3c1e12f062c |
---|---|
606 call test_override("char_avail", 0) | 606 call test_override("char_avail", 0) |
607 bw! | 607 bw! |
608 endfunc | 608 endfunc |
609 | 609 |
610 func Test_search_cmdline7() | 610 func Test_search_cmdline7() |
611 " Test that an pressing <c-g> in an empty command line | 611 " Test that pressing <c-g> in an empty command line |
612 " does not move the cursor | 612 " does not move the cursor |
613 CheckOption incsearch | 613 CheckOption incsearch |
614 | 614 |
615 " need to disable char_avail, | 615 " need to disable char_avail, |
616 " so that expansion of commandline works | 616 " so that expansion of commandline works |
1640 call feedkeys('/\_.\%(\uello\)\' .. "\<CR>", 'xt') | 1640 call feedkeys('/\_.\%(\uello\)\' .. "\<CR>", 'xt') |
1641 call assert_equal([2, 4], [line('.'), col('.')]) | 1641 call assert_equal([2, 4], [line('.'), col('.')]) |
1642 | 1642 |
1643 set ignorecase& smartcase& | 1643 set ignorecase& smartcase& |
1644 close! | 1644 close! |
1645 endfun | |
1646 | |
1647 " Test 'smartcase' with utf-8. | |
1648 func Test_search_smartcase_utf8() | |
1649 new | |
1650 let save_enc = &encoding | |
1651 set encoding=utf8 ignorecase smartcase | |
1652 | |
1653 call setline(1, 'Café cafÉ') | |
1654 1s/café/x/g | |
1655 call assert_equal('x x', getline(1)) | |
1656 | |
1657 call setline(1, 'Café cafÉ') | |
1658 1s/cafÉ/x/g | |
1659 call assert_equal('Café x', getline(1)) | |
1660 | |
1661 set ignorecase& smartcase& | |
1662 let &encoding = save_enc | |
1663 close! | |
1645 endfunc | 1664 endfunc |
1646 | 1665 |
1647 " Test searching past the end of a file | 1666 " Test searching past the end of a file |
1648 func Test_search_past_eof() | 1667 func Test_search_past_eof() |
1649 new | 1668 new |