Mercurial > vim
comparison src/testdir/test_balloon.vim @ 17089:8e9e9124c7a2 v8.1.1544
patch 8.1.1544: some balloon tests don't run when they can
commit https://github.com/vim/vim/commit/b46fecd3454399f8ebdc5055302e4bfc5a10f98b
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jun 15 17:58:09 2019 +0200
patch 8.1.1544: some balloon tests don't run when they can
Problem: Some balloon tests don't run when they can.
Solution: Split GUI balloon tests off into a separate file. (Ozaki Kiichi,
closes #4538) Change the feature check into a command for
consistency.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 15 Jun 2019 18:00:08 +0200 |
parents | ba7727889385 |
children | 6990c1160ea5 |
comparison
equal
deleted
inserted
replaced
17088:49eb35886d80 | 17089:8e9e9124c7a2 |
---|---|
1 " Tests for 'balloonevalterm'. | 1 " Tests for 'balloonevalterm'. |
2 " A few tests only work in the terminal. | |
2 | 3 |
3 if !has('balloon_eval_term') | 4 if has('gui_running') |
4 throw 'Skipped: balloon_eval_term feature missing' | 5 throw 'Skipped: only work in the terminal' |
5 endif | 6 endif |
6 | 7 |
7 " A few tests only work in the terminal. | 8 source check.vim |
8 if !has('gui_running') | 9 CheckFeature balloon_eval_term |
9 | 10 |
10 source screendump.vim | 11 source screendump.vim |
11 if !CanRunVimInTerminal() | 12 if !CanRunVimInTerminal() |
12 throw 'Skipped: cannot make screendumps' | 13 throw 'Skipped: cannot make screendumps' |
13 endif | 14 endif |
54 | 55 |
55 " clean up | 56 " clean up |
56 call StopVimInTerminal(buf) | 57 call StopVimInTerminal(buf) |
57 call delete('XTest_beval_visual') | 58 call delete('XTest_beval_visual') |
58 endfunc | 59 endfunc |
59 | |
60 endif | |
61 | |
62 " Tests that only work in the GUI | |
63 if has('gui_running') | |
64 | |
65 func Test_balloon_show_gui() | |
66 let msg = 'this this this this' | |
67 call balloon_show(msg) | |
68 call assert_equal(msg, balloon_gettext()) | |
69 sleep 10m | |
70 call balloon_show('') | |
71 | |
72 let msg = 'that that' | |
73 call balloon_show(msg) | |
74 call assert_equal(msg, balloon_gettext()) | |
75 sleep 10m | |
76 call balloon_show('') | |
77 endfunc | |
78 | |
79 endif |