@@ -290,16 +290,16 @@ func Test_termwinscroll_topline()
290
290
endfunc
291
291
292
292
func Test_termwinscroll_topline2 ()
293
+ " calling the terminal API doesn't work on Windows
294
+ CheckNotMSWindows
293
295
let g: test_is_flaky = 1
294
296
let g: print_complete = 0
295
297
func ! Tapi_print_complete (bufnum, arglist)
296
298
let g: print_complete = 1
297
299
endfunc
298
300
299
301
set termwinscroll = 50000 mouse = a
300
- if ! has (' win32' )
301
- set shell = sh
302
- endif
302
+ set shell = sh
303
303
let norm_winid = win_getid ()
304
304
terminal
305
305
call assert_equal (2 , winnr (' $' ))
@@ -309,11 +309,7 @@ func Test_termwinscroll_topline2()
309
309
310
310
let num1 = &termwinscroll / 1000 * 999
311
311
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> " )
317
313
call term_sendkeys (buf , ' printf '' \033]51;["call", "Tapi_print_complete", []]\007'' ' .. " \<cr> " )
318
314
let rows = term_getsize (buf )[0 ]
319
315
let cnt = 0
@@ -332,11 +328,7 @@ func Test_termwinscroll_topline2()
332
328
333
329
let num2 = &termwinscroll / 1000 * 8
334
330
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> " )
340
332
let winrow = get (get (filter (getwininfo (), ' v:val.winid == norm_winid' ), 0 , {}), ' winrow' , -1 )
341
333
342
334
call test_setmouse (winrow, 1 )
0 commit comments