diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-06-12 22:42:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-06-12 22:42:41 +0200 |
commit | 68d48f40a4da79547b53e3164b658812e154d411 (patch) | |
tree | f105df9cab26c0ecb688974635a6bd4fc978e7be /src/testdir | |
parent | 7c7f01e2b260c75d9996ca9ab621119eafe13a63 (diff) | |
download | vim-git-68d48f40a4da79547b53e3164b658812e154d411.tar.gz |
patch 8.1.1522: poup_notification() not implemented yetv8.1.1522
Problem: Popup_notification() not implemented yet.
Solution: Implement it.
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/dumps/Test_popupwin_notify_01.dump | 10 | ||||
-rw-r--r-- | src/testdir/dumps/Test_popupwin_notify_02.dump | 10 | ||||
-rw-r--r-- | src/testdir/test_popupwin.vim | 28 |
3 files changed, 47 insertions, 1 deletions
diff --git a/src/testdir/dumps/Test_popupwin_notify_01.dump b/src/testdir/dumps/Test_popupwin_notify_01.dump new file mode 100644 index 000000000..2ecd5ee1d --- /dev/null +++ b/src/testdir/dumps/Test_popupwin_notify_01.dump @@ -0,0 +1,10 @@ +>1+0&#ffffff0| @7|╔+0#e000002&|═@19|╗| +0#0000000&@43 +|2| @7|║+0#e000002&| |f|i|r|s|t| |n|o|t|i|f|i|c|a|t|i|o|n| |║| +0#0000000&@43 +|3| @7|╚+0#e000002&|═@19|╝| +0#0000000&@43 +|4| @73 +|5| @73 +|6| @73 +|7| @73 +|8| @73 +|9| @73 +@57|1|,|1| @10|T|o|p| diff --git a/src/testdir/dumps/Test_popupwin_notify_02.dump b/src/testdir/dumps/Test_popupwin_notify_02.dump new file mode 100644 index 000000000..10170619a --- /dev/null +++ b/src/testdir/dumps/Test_popupwin_notify_02.dump @@ -0,0 +1,10 @@ +>1+0&#ffffff0| @7|╔+0#e000002&|═@19|╗| +0#0000000&@43 +|2| @7|║+0#e000002&| |f|i|r|s|t| |n|o|t|i|f|i|c|a|t|i|o|n| |║| +0#0000000&@43 +|3| @7|╚+0#e000002&|═@19|╝| +0#0000000&@43 +|4| @7|╔+0fd7ff255|═@31|╗| +0&#ffffff0@31 +|5| @7|║+0fd7ff255| |a|n|o|t|h|e|r| |i|m|p|o|r|t|a|n|t| |n|o|t|i|f|i|c|a|t|i|o|n| |║| +0&#ffffff0@31 +|6| @7|╚+0fd7ff255|═@31|╝| +0&#ffffff0@31 +|7| @73 +|8| @73 +|9| @73 +@57|1|,|1| @10|T|o|p| diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim index d100dc993..9afd84033 100644 --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -428,7 +428,7 @@ endfunc 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 @@ func Test_popup_moved() 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 |