patch 8.1.1522: poup_notification() not implemented yet
Problem: Popup_notification() not implemented yet.
Solution: Implement it.
diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim
index d100dc9..9afd840 100644
--- a/src/testdir/test_popupwin.vim
+++ b/src/testdir/test_popupwin.vim
@@ -428,7 +428,7 @@
func Test_popup_time()
if !has('timers')
- return
+ throw 'Skipped, timer feature not supported'
endif
topleft vnew
call setline(1, 'hello')
@@ -1086,3 +1086,29 @@
bwipe!
call test_override('ALL', 0)
endfunc
+
+func Test_notifications()
+ if !has('timers')
+ throw 'Skipped, timer feature not supported'
+ endif
+ if !CanRunVimInTerminal()
+ throw 'Skipped: cannot make screendumps'
+ endif
+
+ call writefile([
+ \ "call setline(1, range(1, 20))",
+ \ "hi Notification ctermbg=lightblue",
+ \ "call popup_notification('first notification', {})",
+ \], 'XtestNotifications')
+ let buf = RunVimInTerminal('-S XtestNotifications', {'rows': 10})
+ call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {})
+
+ " second one goes below the first one
+ call term_sendkeys(buf, ":call popup_notification('another important notification', {'highlight': 'Notification'})\<CR>")
+ call VerifyScreenDump(buf, 'Test_popupwin_notify_02', {})
+
+
+ " clean up
+ call StopVimInTerminal(buf)
+ call delete('XtestNotifications')
+endfunc