Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
haya14busa committed Oct 20, 2017
1 parent 147d165 commit 8bc7dcc
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/testdir/test_search.vim
Original file line number Diff line number Diff line change
Expand Up @@ -498,5 +498,16 @@ func Test_search_cmdline_incsearch_highlight_attr()
let attr_line2 = [a2,a2,a2,a0,a0,a2,a2,a2]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))

" Test nohlsearch. a2(hlsearch highlight) should become a0(normal highlight)
call term_sendkeys(g:buf, ":1\<cr>")
call term_sendkeys(g:buf, ":set nohlsearch\<cr>")
call term_sendkeys(g:buf, "/vim")
call term_wait(g:buf, 200)
let attr_line1 = [a0,a0,a0,a0,a1,a1,a1,a0,a0,a0,a0,a0,a0,a0]
let attr_line2 = [a0,a0,a0,a0,a0,a0,a0,a0]
call assert_equal(attr_line1, map(term_scrape(g:buf, 1)[:len(attr_line1)-1], 'v:val.attr'))
call assert_equal(attr_line2, map(term_scrape(g:buf, 2)[:len(attr_line2)-1], 'v:val.attr'))

bwipe!
endfunc

0 comments on commit 8bc7dcc

Please sign in to comment.