diff src/testdir/test_popupwin.vim @ 16778:eda4d65f232c v8.1.1391

patch 8.1.1391: no popup window support commit https://github.com/vim/vim/commit/4d784b21d14fc66e98a2b07f70343cdd4acd62aa Author: Bram Moolenaar <Bram@vim.org> Date: Sat May 25 19:51:39 2019 +0200 patch 8.1.1391: no popup window support Problem: No popup window support. Solution: Add initial code for popup windows. Add the 'wincolor' option.
author Bram Moolenaar <Bram@vim.org>
date Sat, 25 May 2019 20:00:08 +0200
parents
children ddfa924df50d
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/src/testdir/test_popupwin.vim
@@ -0,0 +1,26 @@
+" Tests for popup windows
+
+if !has('textprop')
+  finish
+endif
+
+source screendump.vim
+
+func Test_simple_popup()
+  if !CanRunVimInTerminal()
+    return
+  endif
+  call writefile([
+	\ "call setline(1, range(1, 100))",
+	\ "let winid = popup_create('hello there', {'line': 3, 'col': 11})",
+	\ "hi PopupColor ctermbg=lightblue",
+	\ "call setwinvar(winid, '&wincolor', 'PopupColor')",
+	\ "let winid2 = popup_create(['another one', 'another two', 'another three'], {'line': 3, 'col': 25})",
+	\], 'XtestPopup')
+  let buf = RunVimInTerminal('-S XtestPopup', {'rows': 10})
+  call VerifyScreenDump(buf, 'Test_popupwin_01', {})
+
+  " clean up
+  call StopVimInTerminal(buf)
+  call delete('XtestPopup')
+endfunc