mirror of
https://github.com/vim/vim.git
synced 2025-10-02 05:04:20 -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:
@@ -968,3 +968,30 @@ func Test_terminal_open_autocmd()
|
|||||||
unlet s:called
|
unlet s:called
|
||||||
au! repro
|
au! repro
|
||||||
endfunction
|
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[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1636,
|
||||||
/**/
|
/**/
|
||||||
1635,
|
1635,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user