comparison src/testdir/test_balloon.vim @ 16600:ff3c99bd1038 v8.1.1303

patch 8.1.1303: not possible to hide a balloon commit https://github.com/vim/vim/commit/be0a2597ae0d9eb0b8a8a2fc9ae1784faa929844 Author: Bram Moolenaar <Bram@vim.org> Date: Thu May 9 13:50:16 2019 +0200 patch 8.1.1303: not possible to hide a balloon Problem: Not possible to hide a balloon. Solution: Hide the balloon when balloon_show() is called with an empty string or list. Add balloon_gettext().
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 May 2019 14:00:07 +0200
parents fd0d29d63b85
children 9c90cf08cfa8
comparison
equal deleted inserted replaced
16599:319fe0ad8fdc 16600:ff3c99bd1038
1 " Tests for 'balloonevalterm'. 1 " Tests for 'balloonevalterm'.
2 2
3 if !has('balloon_eval_term') || has('gui_running') 3 " Tests that only work in the terminal.
4 finish 4 if has('balloon_eval_term') && !has('gui_running')
5 endif
6 5
7 source screendump.vim 6 source screendump.vim
8 if !CanRunVimInTerminal() 7 if !CanRunVimInTerminal()
9 finish 8 finish
10 endif 9 endif
51 50
52 " clean up 51 " clean up
53 call StopVimInTerminal(buf) 52 call StopVimInTerminal(buf)
54 call delete('XTest_beval_visual') 53 call delete('XTest_beval_visual')
55 endfunc 54 endfunc
55
56 endif
57
58 " Tests that only work in the GUI
59 if has('gui_running')
60
61 func Test_balloon_show_gui()
62 let msg = 'this this this this'
63 call balloon_show(msg)
64 call assert_equal(msg, balloon_gettext())
65 sleep 10m
66 call balloon_show('')
67
68 let msg = 'that that'
69 call balloon_show(msg)
70 call assert_equal(msg, balloon_gettext())
71 sleep 10m
72 call balloon_show('')
73 endfunc
74
75 endif