diff options
Diffstat (limited to 'test/old/testdir/test_search_stat.vim')
-rw-r--r-- | test/old/testdir/test_search_stat.vim | 33 |
1 files changed, 29 insertions, 4 deletions
diff --git a/test/old/testdir/test_search_stat.vim b/test/old/testdir/test_search_stat.vim index 8dfc850956..e7dc71e302 100644 --- a/test/old/testdir/test_search_stat.vim +++ b/test/old/testdir/test_search_stat.vim @@ -153,7 +153,6 @@ func Test_search_stat() let g:a = execute(':unsilent :norm! n') let stat = 'W \[20/1\]' call assert_match(pat .. stat, g:a) - call assert_match('search hit BOTTOM, continuing at TOP', g:a) set norl endif @@ -164,7 +163,6 @@ func Test_search_stat() let g:a = execute(':unsilent :norm! N') let stat = 'W \[20/20\]' call assert_match(pat .. stat, g:a) - call assert_match('search hit TOP, continuing at BOTTOM', g:a) call assert_match('W \[20/20\]', Screenline(&lines)) " normal, no match @@ -422,7 +420,7 @@ func Test_search_stat_and_incsearch() set tabline=%!MyTabLine() END - call writefile(lines, 'Xsearchstat_inc') + call writefile(lines, 'Xsearchstat_inc', 'D') let buf = RunVimInTerminal('-S Xsearchstat_inc', #{rows: 10}) call term_sendkeys(buf, "/abc") @@ -441,8 +439,35 @@ func Test_search_stat_and_incsearch() call TermWait(buf) call StopVimInTerminal(buf) - call delete('Xsearchstat_inc') endfunc +func Test_search_stat_backwards() + CheckScreendump + + let lines =<< trim END + set shm-=S + call setline(1, ['test', '']) + END + call writefile(lines, 'Xsearchstat_back', 'D') + + let buf = RunVimInTerminal('-S Xsearchstat_back', #{rows: 10}) + call term_sendkeys(buf, "*") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_searchstat_back_1', {}) + + call term_sendkeys(buf, "N") + call TermWait(buf) + call VerifyScreenDump(buf, 'Test_searchstat_back_2', {}) + + call term_sendkeys(buf, ":set shm+=S\<cr>N") + call TermWait(buf) + " shows "Search Hit Bottom.." + call VerifyScreenDump(buf, 'Test_searchstat_back_3', {}) + + call term_sendkeys(buf, "\<esc>:qa\<cr>") + call TermWait(buf) + + call StopVimInTerminal(buf) +endfunc " vim: shiftwidth=2 sts=2 expandtab |