Skip to content

Commit 6b989c6

Browse files
committed
don't call terminal api on windows
1 parent c150200 commit 6b989c6

File tree

1 file changed

+5
-13
lines changed

1 file changed

+5
-13
lines changed

src/testdir/test_terminal2.vim

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -290,16 +290,16 @@ func Test_termwinscroll_topline()
290290
endfunc
291291

292292
func Test_termwinscroll_topline2()
293+
" calling the terminal API doesn't work on Windows
294+
CheckNotMSWindows
293295
let g:test_is_flaky = 1
294296
let g:print_complete = 0
295297
func! Tapi_print_complete(bufnum, arglist)
296298
let g:print_complete = 1
297299
endfunc
298300

299301
set termwinscroll=50000 mouse=a
300-
if !has('win32')
301-
set shell=sh
302-
endif
302+
set shell=sh
303303
let norm_winid = win_getid()
304304
terminal
305305
call assert_equal(2, winnr('$'))
@@ -309,11 +309,7 @@ func Test_termwinscroll_topline2()
309309

310310
let num1 = &termwinscroll / 1000 * 999
311311
call writefile(range(num1), 'Xtext', 'D')
312-
if has('win32')
313-
call term_sendkeys(buf, "type Xtext\<CR>")
314-
else
315-
call term_sendkeys(buf, "cat Xtext\<CR>")
316-
endif
312+
call term_sendkeys(buf, "cat Xtext\<CR>")
317313
call term_sendkeys(buf, 'printf ''\033]51;["call", "Tapi_print_complete", []]\007''' .. "\<cr>")
318314
let rows = term_getsize(buf)[0]
319315
let cnt = 0
@@ -332,11 +328,7 @@ func Test_termwinscroll_topline2()
332328

333329
let num2 = &termwinscroll / 1000 * 8
334330
call writefile(range(num2), 'Xtext', 'D')
335-
if has('win32')
336-
call term_sendkeys(buf, "timeout /t 2 && type Xtext\<CR>")
337-
else
338-
call term_sendkeys(buf, "sleep 2; cat Xtext\<CR>")
339-
endif
331+
call term_sendkeys(buf, "sleep 2; cat Xtext\<CR>")
340332
let winrow = get(get(filter(getwininfo(), 'v:val.winid == norm_winid'), 0, {}), 'winrow', -1)
341333

342334
call test_setmouse(winrow, 1)

0 commit comments

Comments
 (0)