Mercurial > vim
diff src/testdir/test_search_stat.vim @ 17948:c77a41ea0365 v8.1.1970
patch 8.1.1970: search stat space wrong, no test for 8.1.1965
Commit: https://github.com/vim/vim/commit/19e8ac72e9c17b894a9c74cb8f70feb33567033c
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Sep 3 22:23:38 2019 +0200
patch 8.1.1970: search stat space wrong, no test for 8.1.1965
Problem: Search stat space wrong, no test for 8.1.1965.
Solution: Fix check for cmd_silent. Add a test. (Christian Brabandt)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 03 Sep 2019 22:30:03 +0200 |
parents | 7d4c814a8554 |
children | 22ddc0ee65e7 |
line wrap: on
line diff
--- a/src/testdir/test_search_stat.vim +++ b/src/testdir/test_search_stat.vim @@ -160,7 +160,28 @@ func! Test_search_stat() let stat = '\[1/2\]' call assert_notmatch(pat .. stat, g:a) + " normal, n comes from a silent mapping + " First test a normal mapping, then a silent mapping + call cursor(1,1) + nnoremap n n + let @/ = 'find this' + let pat = '/find this\s\+' + let g:a = execute(':unsilent :norm n') + let g:b = split(g:a, "\n")[-1] + let stat = '\[1/2\]' + call assert_match(pat .. stat, g:b) + nnoremap <silent> n n + call cursor(1,1) + let g:a = execute(':unsilent :norm n') + let g:b = split(g:a, "\n")[-1] + let stat = '\[1/2\]' + call assert_notmatch(pat .. stat, g:b) + call assert_match(stat, g:b) + unmap n + + " Clean up + set shortmess+=S + " close the window - set shortmess+=S bwipe! endfunc