comparison src/testdir/test_balloon.vim @ 30110:ba5ca7c7d44c v9.0.0391

patch 9.0.0391: using separate delete() call instead of writefile() 'D' flag Commit: https://github.com/vim/vim/commit/3411265a3698c3d5ef56d9b0c3bb237a9f5fdba1 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Sep 5 21:40:44 2022 +0100 patch 9.0.0391: using separate delete() call instead of writefile() 'D' flag Problem: Using separate delete() call instead of writefile() 'D' flag. Solution: Use the writefile 'D' flag.
author Bram Moolenaar <Bram@vim.org>
date Mon, 05 Sep 2022 22:45:03 +0200
parents 9e0ac05f579a
children ad79859e2780
comparison
equal deleted inserted replaced
30109:41b1661eefbc 30110:ba5ca7c7d44c
27 func Trigger() 27 func Trigger()
28 call test_setmouse(2, 6) 28 call test_setmouse(2, 6)
29 call feedkeys("\<MouseMove>\<Ignore>", "xt") 29 call feedkeys("\<MouseMove>\<Ignore>", "xt")
30 endfunc 30 endfunc
31 [CODE] 31 [CODE]
32 call writefile(s:common_script + xtra_lines, 'XTest_beval') 32 call writefile(s:common_script + xtra_lines, 'XTest_beval', 'D')
33 33
34 " Check that the balloon shows up after a mouse move 34 " Check that the balloon shows up after a mouse move
35 let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50}) 35 let buf = RunVimInTerminal('-S XTest_beval', {'rows': 10, 'cols': 50})
36 call TermWait(buf, 50) 36 call TermWait(buf, 50)
37 call term_sendkeys(buf, 'll') 37 call term_sendkeys(buf, 'll')
43 call TermWait(buf, 150) 43 call TermWait(buf, 150)
44 call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {}) 44 call VerifyScreenDump(buf, 'Test_balloon_eval_term_01a', {})
45 45
46 " clean up 46 " clean up
47 call StopVimInTerminal(buf) 47 call StopVimInTerminal(buf)
48 call delete('XTest_beval')
49 endfunc 48 endfunc
50 49
51 func Test_balloon_eval_term_visual() 50 func Test_balloon_eval_term_visual()
52 " Use <Ignore> after <MouseMove> to return from vgetc() without removing 51 " Use <Ignore> after <MouseMove> to return from vgetc() without removing
53 " the balloon. 52 " the balloon.
54 call writefile(s:common_script + [ 53 call writefile(s:common_script + [
55 \ 'call test_setmouse(3, 6)', 54 \ 'call test_setmouse(3, 6)',
56 \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")', 55 \ 'call feedkeys("3Gevfr\<MouseMove>\<Ignore>", "xt")',
57 \ ], 'XTest_beval_visual') 56 \ ], 'XTest_beval_visual', 'D')
58 57
59 " Check that the balloon shows up after a mouse move 58 " Check that the balloon shows up after a mouse move
60 let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50}) 59 let buf = RunVimInTerminal('-S XTest_beval_visual', {'rows': 10, 'cols': 50})
61 call TermWait(buf, 50) 60 call TermWait(buf, 50)
62 call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {}) 61 call VerifyScreenDump(buf, 'Test_balloon_eval_term_02', {})
63 62
64 " clean up 63 " clean up
65 call StopVimInTerminal(buf) 64 call StopVimInTerminal(buf)
66 call delete('XTest_beval_visual')
67 endfunc 65 endfunc
68 66
69 " vim: shiftwidth=2 sts=2 expandtab 67 " vim: shiftwidth=2 sts=2 expandtab