comparison src/testdir/test_popup.vim @ 13408:de69701e0592 v8.0.1578

patch 8.0.1578: no test for :popup in terminal commit https://github.com/vim/vim/commit/69f5a3011d5a93e0d54837e97d625bd6c253d897 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Mar 6 13:23:08 2018 +0100 patch 8.0.1578: no test for :popup in terminal Problem: No test for :popup in terminal. Solution: Add a screen dump test.
author Christian Brabandt <cb@256bit.org>
date Tue, 06 Mar 2018 13:30:07 +0100
parents 1ba4f926247c
children 66b1d74be322
comparison
equal deleted inserted replaced
13407:a6048fe19672 13408:de69701e0592
784 call term_sendkeys(buf, "\<Esc>u") 784 call term_sendkeys(buf, "\<Esc>u")
785 call StopVimInTerminal(buf) 785 call StopVimInTerminal(buf)
786 call delete('Xtest') 786 call delete('Xtest')
787 endfunc 787 endfunc
788 788
789 func Test_popup_command()
790 if !CanRunVimInTerminal() || !has('menu')
791 return
792 endif
793
794 call writefile([
795 \ 'one two three four five',
796 \ 'and one two Xthree four five',
797 \ 'one more two three four five',
798 \ ], 'Xtest')
799 let buf = RunVimInTerminal('Xtest', {})
800 call term_sendkeys(buf, ":source $VIMRUNTIME/menu.vim\<CR>")
801 call term_sendkeys(buf, "/X\<CR>:popup PopUp\<CR>")
802 call VerifyScreenDump(buf, 'Test_popup_command_01', {})
803
804 " Select a word
805 call term_sendkeys(buf, "jj")
806 call VerifyScreenDump(buf, 'Test_popup_command_02', {})
807
808 " Select a word
809 call term_sendkeys(buf, "j\<CR>")
810 call VerifyScreenDump(buf, 'Test_popup_command_03', {})
811
812 call term_sendkeys(buf, "\<Esc>")
813 call StopVimInTerminal(buf)
814 call delete('Xtest')
815 endfunc
816
817
789 " vim: shiftwidth=2 sts=2 expandtab 818 " vim: shiftwidth=2 sts=2 expandtab