0
0
mirror of https://github.com/vim/vim.git synced 2025-09-30 04:44:14 -04:00

patch 8.0.1636: no test for term_dumpload() and term_dumpdiff()

Problem:    No test for term_dumpload() and term_dumpdiff().
Solution:   Add tests.
This commit is contained in:
Bram Moolenaar
2018-03-24 14:30:32 +01:00
parent 16d7eced1a
commit 45d2a64f96
2 changed files with 29 additions and 0 deletions

View File

@@ -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

View File

@@ -766,6 +766,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1636,
/**/
1635,
/**/