Mercurial > vim
changeset 13525:7d0a8ca17f30 v8.0.1636
patch 8.0.1636: no test for term_dumpload() and term_dumpdiff()
commit https://github.com/vim/vim/commit/45d2a64f964238753403017b6d0ef30be88ccf37
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Mar 24 14:30:32 2018 +0100
patch 8.0.1636: no test for term_dumpload() and term_dumpdiff()
Problem: No test for term_dumpload() and term_dumpdiff().
Solution: Add tests.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 24 Mar 2018 14:45:06 +0100 |
parents | 80a30c002995 |
children | 9364caced97e |
files | src/testdir/test_terminal.vim src/version.c |
diffstat | 2 files changed, 29 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_terminal.vim +++ b/src/testdir/test_terminal.vim @@ -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