summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-11-02 16:16:31 +0100
committerBram Moolenaar <Bram@vim.org>2017-11-02 16:16:31 +0100
commitb94340c04f524482b408543daa1142f883831cab (patch)
tree6feea022872e314f62f63c0c940d4f72d8930e61
parentf45938cc20ed6992e5215ffe41b73b528c78be9c (diff)
downloadvim-b94340c04f524482b408543daa1142f883831cab.zip
patch 8.0.1244: search test does not work correctly on MS-Windows
Problem: Search test does not work correctly on MS-Windows. Solution: Put text in a file instead of sending it to the terminal. (Christian Brabandt)
-rw-r--r--src/testdir/test_search.vim13
-rw-r--r--src/version.c2
2 files changed, 10 insertions, 5 deletions
diff --git a/src/testdir/test_search.vim b/src/testdir/test_search.vim
index 8d68f0c05..ded28f483 100644
--- a/src/testdir/test_search.vim
+++ b/src/testdir/test_search.vim
@@ -494,13 +494,15 @@ func Test_search_cmdline_incsearch_highlight_attr()
if h < 3
return
endif
- let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile'], {'term_rows': 3})
" Prepare buffer text
- let lines = ['abb vim vim vi', 'vimvivim']
- call term_sendkeys(g:buf, 'i' . join(lines, "\n") . "\<esc>gg0")
- call term_wait(g:buf, 200)
- call assert_equal(lines[0], term_getline(g:buf, 1))
+ let g:lines = ['abb vim vim vi', 'vimvivim']
+ call writefile(g:lines, 'Xsearch.txt')
+ let g:buf = term_start([GetVimProg(), '--clean', '-c', 'set noswapfile', 'Xsearch.txt'], {'term_rows': 3})
+ call WaitFor('g:lines[0] == term_getline(g:buf, 1)')
+ call assert_equal(g:lines[0], term_getline(g:buf, 1))
+ call assert_equal(g:lines[1], term_getline(g:buf, 2))
+ unlet g:lines
" Get attr of normal(a0), incsearch(a1), hlsearch(a2) highlight
call term_sendkeys(g:buf, ":set incsearch hlsearch\<cr>")
@@ -565,6 +567,7 @@ func Test_search_cmdline_incsearch_highlight_attr()
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'))
+ call delete('Xsearch.txt')
bwipe!
endfunc
diff --git a/src/version.c b/src/version.c
index 83bfd7063..a46fb77c1 100644
--- a/src/version.c
+++ b/src/version.c
@@ -762,6 +762,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 1244,
+/**/
1243,
/**/
1242,