comparison src/testdir/test_terminal.vim @ 13688:f07e48d6650b v8.0.1716

patch 8.0.1716: test for term_setsize() does not give a good error message commit https://github.com/vim/vim/commit/ac3e830065f1e54c422cdd2f3157fb35fac27e04 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Apr 15 13:10:44 2018 +0200 patch 8.0.1716: test for term_setsize() does not give a good error message Problem: Test for term_setsize() does not give a good error message. Solution: use assert_inrange().
author Christian Brabandt <cb@256bit.org>
date Sun, 15 Apr 2018 13:15:05 +0200
parents 1651a4c5c27a
children 2dd14253ad12
comparison
equal deleted inserted replaced
13687:e501ec828a72 13688:f07e48d6650b
281 call term_sendkeys(buf, "cat Xtext\<CR>") 281 call term_sendkeys(buf, "cat Xtext\<CR>")
282 endif 282 endif
283 let rows = term_getsize(buf)[0] 283 let rows = term_getsize(buf)[0]
284 call WaitFor({-> term_getline(buf, rows - 1) =~ '149'}) 284 call WaitFor({-> term_getline(buf, rows - 1) =~ '149'})
285 let lines = line('$') 285 let lines = line('$')
286 call assert_true(lines <= 100) 286 call assert_inrange(91, 100, lines)
287 call assert_true(lines > 90)
288 287
289 call Stop_shell_in_terminal(buf) 288 call Stop_shell_in_terminal(buf)
290 call term_wait(buf) 289 call term_wait(buf)
291 exe buf . 'bwipe' 290 exe buf . 'bwipe'
292 set terminalscroll& 291 set terminalscroll&