comparison src/testdir/test_popup.vim @ 18767:068337e86133 v8.1.2373

patch 8.1.2373: cannot build with +popupwin but without +quickfix Commit: https://github.com/vim/vim/commit/5a4c3082d7ab51b3d448a91578479c96c1ab0ad3 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Dec 1 15:23:11 2019 +0100 patch 8.1.2373: cannot build with +popupwin but without +quickfix Problem: Cannot build with +popupwin but without +quickfix. (John Marriott) Solution: Adjust #ifdefs.
author Bram Moolenaar <Bram@vim.org>
date Sun, 01 Dec 2019 15:30:04 +0100
parents de350001150c
children da791e5c0139
comparison
equal deleted inserted replaced
18766:3cc0ddf2abd0 18767:068337e86133
488 endfunc 488 endfunc
489 489
490 " Test that 'completefunc' on Scratch buffer with preview window works when 490 " Test that 'completefunc' on Scratch buffer with preview window works when
491 " it's OK. 491 " it's OK.
492 func Test_completefunc_with_scratch_buffer() 492 func Test_completefunc_with_scratch_buffer()
493 CheckFeature quickfix
494
493 new +setlocal\ buftype=nofile\ bufhidden=wipe\ noswapfile 495 new +setlocal\ buftype=nofile\ bufhidden=wipe\ noswapfile
494 set completeopt+=preview 496 set completeopt+=preview
495 setlocal completefunc=DummyCompleteFive 497 setlocal completefunc=DummyCompleteFive
496 call feedkeys("A\<C-X>\<C-U>\<C-N>\<C-N>\<C-N>\<Esc>", "x") 498 call feedkeys("A\<C-X>\<C-U>\<C-N>\<C-N>\<C-N>\<Esc>", "x")
497 call assert_equal(['April'], getline(1, '$')) 499 call assert_equal(['April'], getline(1, '$'))
663 bwipe! 665 bwipe!
664 endfunc 666 endfunc
665 667
666 func Test_popup_and_window_resize() 668 func Test_popup_and_window_resize()
667 CheckFeature terminal 669 CheckFeature terminal
670 CheckFeature quickfix
668 CheckNotGui 671 CheckNotGui
669 672
670 let h = winheight(0) 673 let h = winheight(0)
671 if h < 15 674 if h < 15
672 return 675 return
695 call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0])) 698 call assert_match('^!\s*$', term_getline(buf, term_getcursor(buf)[0]))
696 bwipe! 699 bwipe!
697 endfunc 700 endfunc
698 701
699 func Test_popup_and_preview_autocommand() 702 func Test_popup_and_preview_autocommand()
703 CheckFeature python
704 CheckFeature quickfix
705 if winheight(0) < 15
706 throw 'Skipped: window height insufficient'
707 endif
708
700 " This used to crash Vim 709 " This used to crash Vim
701 if !has('python')
702 return
703 endif
704 let h = winheight(0)
705 if h < 15
706 return
707 endif
708 new 710 new
709 augroup MyBufAdd 711 augroup MyBufAdd
710 au! 712 au!
711 au BufAdd * nested tab sball 713 au BufAdd * nested tab sball
712 augroup END 714 augroup END
733 augroup! MyBufAdd 735 augroup! MyBufAdd
734 bw! 736 bw!
735 endfunc 737 endfunc
736 738
737 func Test_popup_and_previewwindow_dump() 739 func Test_popup_and_previewwindow_dump()
738 if !CanRunVimInTerminal() 740 CheckScreendump
739 throw 'Skipped: cannot make screendumps' 741 CheckFeature quickfix
740 endif 742
741 let lines =<< trim END 743 let lines =<< trim END
742 set previewheight=9 744 set previewheight=9
743 silent! pedit 745 silent! pedit
744 call setline(1, map(repeat(["ab"], 10), "v:val. v:key")) 746 call setline(1, map(repeat(["ab"], 10), "v:val. v:key"))
745 exec "norm! G\<C-E>\<C-E>" 747 exec "norm! G\<C-E>\<C-E>"
802 \ ], balloon_split( 804 \ ], balloon_split(
803 \ "Some comment\n\ntypedef this that;")) 805 \ "Some comment\n\ntypedef this that;"))
804 endfunc 806 endfunc
805 807
806 func Test_popup_position() 808 func Test_popup_position()
807 if !CanRunVimInTerminal() 809 CheckScreendump
808 throw 'Skipped: cannot make screendumps' 810
809 endif
810 let lines =<< trim END 811 let lines =<< trim END
811 123456789_123456789_123456789_a 812 123456789_123456789_123456789_a
812 123456789_123456789_123456789_b 813 123456789_123456789_123456789_b
813 123 814 123
814 END 815 END
845 call StopVimInTerminal(buf) 846 call StopVimInTerminal(buf)
846 call delete('Xtest') 847 call delete('Xtest')
847 endfunc 848 endfunc
848 849
849 func Test_popup_command() 850 func Test_popup_command()
850 if !CanRunVimInTerminal() || !has('menu') 851 CheckScreendump
851 throw 'Skipped: cannot make screendumps and/or menu feature missing' 852 CheckFeature menu
852 endif
853 853
854 let lines =<< trim END 854 let lines =<< trim END
855 one two three four five 855 one two three four five
856 and one two Xthree four five 856 and one two Xthree four five
857 one more two three four five 857 one more two three four five