Skip to content

Commit

Permalink
patch 8.0.1637: no test for term_dumpdiff() options argument
Browse files Browse the repository at this point in the history
Problem:    No test for term_dumpdiff() options argument.
Solution:   Add a test.
  • Loading branch information
brammool committed Mar 24, 2018
1 parent 45d2a64 commit 897e63c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/testdir/test_terminal.vim
Expand Up @@ -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
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -766,6 +766,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1637,
/**/
1636,
/**/
Expand Down

0 comments on commit 897e63c

Please sign in to comment.