Permalink
Browse files

patch 8.0.1637: no test for term_dumpdiff() options argument

Problem:    No test for term_dumpdiff() options argument.
Solution:   Add a test.
  • Loading branch information...
brammool committed Mar 24, 2018
1 parent 45d2a64 commit 897e63c4c0623078b5b39e2715b10f456a2453e7
Showing with 30 additions and 0 deletions.
  1. +28 −0 src/testdir/test_terminal.vim
  2. +2 −0 src/version.c
@@ -995,3 +995,31 @@ func Test_terminal_dumpdiff()
call assert_equal(' bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
quit
endfunc
func Test_terminal_dumpdiff_options()
set laststatus=0
call assert_equal(1, winnr('$'))
let height = winheight(0)
call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_02.dump', {'vertical': 1, 'term_cols': 33})
call assert_equal(2, winnr('$'))
call assert_equal(height, winheight(winnr()))
call assert_equal(33, winwidth(winnr()))
call assert_equal('dump diff dumps/Test_popup_command_01.dump', bufname('%'))
quit
call assert_equal(1, winnr('$'))
let width = winwidth(0)
call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_02.dump', {'vertical': 0, 'term_rows': 13, 'term_name': 'something else'})
call assert_equal(2, winnr('$'))
call assert_equal(width, winwidth(winnr()))
call assert_equal(13, winheight(winnr()))
call assert_equal('something else', bufname('%'))
quit
call assert_equal(1, winnr('$'))
call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_02.dump', {'curwin': 1})
call assert_equal(1, winnr('$'))
bwipe
set laststatus&
endfunc
@@ -766,6 +766,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1637,
/**/
1636,
/**/

0 comments on commit 897e63c

Please sign in to comment.