comparison src/testdir/test_terminal.vim @ 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 661394686fd8
children b2b99d01321b
comparison
equal deleted inserted replaced
13524:80a30c002995 13525:7d0a8ca17f30
966 exe buf . "bwipe!" 966 exe buf . "bwipe!"
967 967
968 unlet s:called 968 unlet s:called
969 au! repro 969 au! repro
970 endfunction 970 endfunction
971
972 func Check_dump01(off)
973 call assert_equal('one two three four five', trim(getline(a:off + 1)))
974 call assert_equal('~ Select Word', trim(getline(a:off + 7)))
975 call assert_equal(':popup PopUp :', trim(getline(a:off + 20)))
976 endfunc
977
978 " just testing basic functionality.
979 func Test_terminal_dumpload()
980 call assert_equal(1, winnr('$'))
981 call term_dumpload('dumps/Test_popup_command_01.dump')
982 call assert_equal(2, winnr('$'))
983 call assert_equal(20, line('$'))
984 call Check_dump01(0)
985 quit
986 endfunc
987
988 func Test_terminal_dumpdiff()
989 call assert_equal(1, winnr('$'))
990 call term_dumpdiff('dumps/Test_popup_command_01.dump', 'dumps/Test_popup_command_02.dump')
991 call assert_equal(2, winnr('$'))
992 call assert_equal(62, line('$'))
993 call Check_dump01(0)
994 call Check_dump01(42)
995 call assert_equal(' bbbbbbbbbbbbbbbbbb ', getline(26)[0:29])
996 quit
997 endfunc