mirror of
https://github.com/vim/vim.git
synced 2025-09-28 04:24:06 -04:00
patch 8.0.1637: no test for term_dumpdiff() options argument
Problem: No test for term_dumpdiff() options argument. Solution: Add a test.
This commit is contained in:
@@ -995,3 +995,31 @@ func Test_terminal_dumpdiff()
|
|||||||
call assert_equal(' bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
|
call assert_equal(' bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
|
||||||
quit
|
quit
|
||||||
endfunc
|
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[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1637,
|
||||||
/**/
|
/**/
|
||||||
1636,
|
1636,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user