comparison src/testdir/test_popup.vim @ 17657:0da9bc55c31a v8.1.1826

patch 8.1.1826: tests use hand coded feature and option checks commit https://github.com/vim/vim/commit/8c5a278fc508da6dfe50e69b6ee734451aa4eafb Author: Bram Moolenaar <Bram@vim.org> Date: Wed Aug 7 23:07:07 2019 +0200 patch 8.1.1826: tests use hand coded feature and option checks Problem: Tests use hand coded feature and option checks. Solution: Use the commands from check.vim in more tests.
author Bram Moolenaar <Bram@vim.org>
date Wed, 07 Aug 2019 23:15:07 +0200
parents 6990c1160ea5
children a7afcea6f40a
comparison
equal deleted inserted replaced
17656:2adce9da20d8 17657:0da9bc55c31a
1 " Test for completion menu 1 " Test for completion menu
2 2
3 source shared.vim 3 source shared.vim
4 source screendump.vim 4 source screendump.vim
5 source check.vim
5 6
6 let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] 7 let g:months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
7 let g:setting = '' 8 let g:setting = ''
8 9
9 func ListMonths() 10 func ListMonths()
661 call assert_equal(expected, getline(1,'$')) 662 call assert_equal(expected, getline(1,'$'))
662 bwipe! 663 bwipe!
663 endfunc 664 endfunc
664 665
665 func Test_popup_and_window_resize() 666 func Test_popup_and_window_resize()
666 if !has('terminal') || has('gui_running') 667 CheckFeature terminal
667 return 668 CheckNotGui
668 endif 669
669 let h = winheight(0) 670 let h = winheight(0)
670 if h < 15 671 if h < 15
671 return 672 return
672 endif 673 endif
673 let rows = h / 3 674 let rows = h / 3
916 set completeopt& 917 set completeopt&
917 delfunc s:act_on_text_changed 918 delfunc s:act_on_text_changed
918 endfunc 919 endfunc
919 920
920 func Test_menu_only_exists_in_terminal() 921 func Test_menu_only_exists_in_terminal()
921 if !exists(':tlmenu') || has('gui_running') 922 CheckCommand tlmenu
922 return 923 CheckNotGui
923 endif 924
924 tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+ 925 tlnoremenu &Edit.&Paste<Tab>"+gP <C-W>"+
925 aunmenu * 926 aunmenu *
926 try 927 try
927 popup Edit 928 popup Edit
928 call assert_false(1, 'command should have failed') 929 call assert_false(1, 'command should have failed')