Skip to content
Permalink
Browse files
patch 8.0.1636: no test for term_dumpload() and term_dumpdiff()
Problem:    No test for term_dumpload() and term_dumpdiff().
Solution:   Add tests.
  • Loading branch information
brammool committed Mar 24, 2018
1 parent 16d7ece commit 45d2a64f964238753403017b6d0ef30be88ccf37
Showing with 29 additions and 0 deletions.
  1. +27 −0 src/testdir/test_terminal.vim
  2. +2 −0 src/version.c
@@ -968,3 +968,30 @@ func Test_terminal_open_autocmd()
unlet s:called
au! repro
endfunction

func Check_dump01(off)
call assert_equal('one two three four five', trim(getline(a:off + 1)))
call assert_equal('~ Select Word', trim(getline(a:off + 7)))
call assert_equal(':popup PopUp :', trim(getline(a:off + 20)))
endfunc

" just testing basic functionality.
func Test_terminal_dumpload()
call assert_equal(1, winnr('$'))
call term_dumpload('dumps/Test_popup_command_01.dump')
call assert_equal(2, winnr('$'))
call assert_equal(20, line('$'))
call Check_dump01(0)
quit
endfunc

func Test_terminal_dumpdiff()
call assert_equal(1, winnr('$'))
call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_02.dump')
call assert_equal(2, winnr('$'))
call assert_equal(62, line('$'))
call Check_dump01(0)
call Check_dump01(42)
call assert_equal(' bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
quit
endfunc
@@ -766,6 +766,8 @@ static char *(features[]) =

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

0 comments on commit 45d2a64

Please sign in to comment.