summaryrefslogtreecommitdiffstats
path: root/src/testdir
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2019-08-21 15:13:41 +0200
committerBram Moolenaar <Bram@vim.org>2019-08-21 15:13:41 +0200
commitbd483b3f577ee1af7c8c8bf440f5d81613336975 (patch)
tree0de3487b03642aa7e85ce65560df2a41fc0b80df /src/testdir
parente2c453d38f6512ac4cff7cd26aa7780b4e2534d7 (diff)
patch 8.1.1902: cannot have an info popup without a borderv8.1.1902
Problem: Cannot have an info popup without a border. Solution: Add the "border" item to 'completepopup'.
Diffstat (limited to 'src/testdir')
-rw-r--r--src/testdir/dumps/Test_popupwin_infopopup_nb_1.dump14
-rw-r--r--src/testdir/gen_opt_test.vim2
-rw-r--r--src/testdir/test_popupwin.vim31
3 files changed, 42 insertions, 5 deletions
diff --git a/src/testdir/dumps/Test_popupwin_infopopup_nb_1.dump b/src/testdir/dumps/Test_popupwin_infopopup_nb_1.dump
new file mode 100644
index 0000000000..41208eeee9
--- /dev/null
+++ b/src/testdir/dumps/Test_popupwin_infopopup_nb_1.dump
@@ -0,0 +1,14 @@
+|t+0&#ffffff0|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| |t|e|x|t| |t|a|w|o|r|d> @43
+|~+0#4040ff13&| @23| +0#0000001#e0e0e08|w|r|d| @4|W| |e|x|t|r|a| |t|e|x|t| @1|w|o|r|d|s| |a|r|e| |c|o@1|l| | +0#4040ff13#ffffff0@11
+|~| @23| +0#0000001#ffd7ff255|a|n|o|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| | +0#4040ff13#ffffff0@27
+|~| @23| +0#0000001#ffd7ff255|n|o|a|w|r|d| @1|W| |e|x|t|r|a| |t|e|x|t| | +0#4040ff13#ffffff0@27
+|~| @23| +0#0000001#ffd7ff255|t|h|a|t|w|r|d| |W| |e|x|t|r|a| |t|e|x|t| | +0#4040ff13#ffffff0@27
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|~| @73
+|-+2#0000000&@1| |U|s|e|r| |d|e|f|i|n|e|d| |c|o|m|p|l|e|t|i|o|n| |(|^|U|^|N|^|P|)| |m+0#00e0003&|a|t|c|h| |1| |o|f| |4| +0#0000000&@26
diff --git a/src/testdir/gen_opt_test.vim b/src/testdir/gen_opt_test.vim
index 3c182ea74b..a8eca747da 100644
--- a/src/testdir/gen_opt_test.vim
+++ b/src/testdir/gen_opt_test.vim
@@ -78,7 +78,7 @@ let test_values = {
\ 'complete': [['', 'w,b'], ['xxx']],
\ 'concealcursor': [['', 'n', 'nvic'], ['xxx']],
\ 'completeopt': [['', 'menu', 'menu,longest'], ['xxx', 'menu,,,longest,']],
- \ 'completepopup': [['', 'height:13', 'highlight:That', 'width:10,height:234,highlight:Mine'], ['height:yes', 'width:no', 'xxx', 'xxx:99']],
+ \ 'completepopup': [['', 'height:13', 'highlight:That', 'width:10,height:234,highlight:Mine'], ['height:yes', 'width:no', 'xxx', 'xxx:99', 'border:maybe', 'border:1']],
\ 'completeslash': [['', 'slash', 'backslash'], ['xxx']],
\ 'cryptmethod': [['', 'zip'], ['xxx']],
\ 'cscopequickfix': [['', 's-', 's-,c+,e0'], ['xxx', 's,g,d']],
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index 15a61f962c..98522b792f 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -2193,14 +2193,11 @@ func Test_previewpopup()
call delete('Xheader.h')
endfunc
-func Test_popupmenu_info()
- CheckScreendump
-
+func Get_popupmenu_lines()
let lines =<< trim END
set completeopt+=preview,popup
set completefunc=CompleteFuncDict
hi InfoPopup ctermbg=yellow
- set completepopup=height:4,highlight:InfoPopup
func CompleteFuncDict(findstart, base)
if a:findstart
@@ -2249,7 +2246,16 @@ func Test_popupmenu_info()
endfunc
call setline(1, 'text text text text text text text ')
END
+ return lines
+endfunc
+
+func Test_popupmenu_info_border()
+ CheckScreendump
+
+ let lines = Get_popupmenu_lines()
+ call add(lines, 'set completepopup=height:4,highlight:InfoPopup')
call writefile(lines, 'XtestInfoPopup')
+
let buf = RunVimInTerminal('-S XtestInfoPopup', #{rows: 14})
call term_wait(buf, 50)
@@ -2269,4 +2275,21 @@ func Test_popupmenu_info()
call delete('XtestInfoPopup')
endfunc
+func Test_popupmenu_info_noborder()
+ CheckScreendump
+
+ let lines = Get_popupmenu_lines()
+ call add(lines, 'set completepopup=height:4,border:off')
+ call writefile(lines, 'XtestInfoPopupNb')
+
+ let buf = RunVimInTerminal('-S XtestInfoPopupNb', #{rows: 14})
+ call term_wait(buf, 50)
+
+ call term_sendkeys(buf, "A\<C-X>\<C-U>")
+ call VerifyScreenDump(buf, 'Test_popupwin_infopopup_nb_1', {})
+
+ call StopVimInTerminal(buf)
+ call delete('XtestInfoPopupNb')
+endfunc
+
" vim: shiftwidth=2 sts=2