Mercurial > vim
comparison src/testdir/test_popupwin.vim @ 17045:7fe328ad5573 v8.1.1522
patch 8.1.1522: poup_notification() not implemented yet
commit https://github.com/vim/vim/commit/68d48f40a4da79547b53e3164b658812e154d411
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jun 12 22:42:41 2019 +0200
patch 8.1.1522: poup_notification() not implemented yet
Problem: Popup_notification() not implemented yet.
Solution: Implement it.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 12 Jun 2019 22:45:07 +0200 |
parents | d99805d25b42 |
children | 6400d1ad5e4b |
comparison
equal
deleted
inserted
replaced
17044:687ec0a10570 | 17045:7fe328ad5573 |
---|---|
426 call delete('XtestPopup') | 426 call delete('XtestPopup') |
427 endfunc | 427 endfunc |
428 | 428 |
429 func Test_popup_time() | 429 func Test_popup_time() |
430 if !has('timers') | 430 if !has('timers') |
431 return | 431 throw 'Skipped, timer feature not supported' |
432 endif | 432 endif |
433 topleft vnew | 433 topleft vnew |
434 call setline(1, 'hello') | 434 call setline(1, 'hello') |
435 | 435 |
436 call popup_create('world', { | 436 call popup_create('world', { |
1084 call popup_clear() | 1084 call popup_clear() |
1085 | 1085 |
1086 bwipe! | 1086 bwipe! |
1087 call test_override('ALL', 0) | 1087 call test_override('ALL', 0) |
1088 endfunc | 1088 endfunc |
1089 | |
1090 func Test_notifications() | |
1091 if !has('timers') | |
1092 throw 'Skipped, timer feature not supported' | |
1093 endif | |
1094 if !CanRunVimInTerminal() | |
1095 throw 'Skipped: cannot make screendumps' | |
1096 endif | |
1097 | |
1098 call writefile([ | |
1099 \ "call setline(1, range(1, 20))", | |
1100 \ "hi Notification ctermbg=lightblue", | |
1101 \ "call popup_notification('first notification', {})", | |
1102 \], 'XtestNotifications') | |
1103 let buf = RunVimInTerminal('-S XtestNotifications', {'rows': 10}) | |
1104 call VerifyScreenDump(buf, 'Test_popupwin_notify_01', {}) | |
1105 | |
1106 " second one goes below the first one | |
1107 call term_sendkeys(buf, ":call popup_notification('another important notification', {'highlight': 'Notification'})\<CR>") | |
1108 call VerifyScreenDump(buf, 'Test_popupwin_notify_02', {}) | |
1109 | |
1110 | |
1111 " clean up | |
1112 call StopVimInTerminal(buf) | |
1113 call delete('XtestNotifications') | |
1114 endfunc |