Mercurial > vim
comparison src/testdir/test_popupwin_textprop.vim @ 17875:f13a5c48320b v8.1.1934
patch 8.1.1934: not enough tests for text property popup window
Commit: https://github.com/vim/vim/commit/bc2d4c1db6d47f6d04412bb5f94b52e444faebc8
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Aug 28 22:18:30 2019 +0200
patch 8.1.1934: not enough tests for text property popup window
Problem: Not enough tests for text property popup window.
Solution: Add a few more tests.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 28 Aug 2019 22:30:03 +0200 |
parents | eaf8b21d80e7 |
children | 642832e45388 |
comparison
equal
deleted
inserted
replaced
17874:3d22626f9c09 | 17875:f13a5c48320b |
---|---|
48 " clean up | 48 " clean up |
49 call StopVimInTerminal(buf) | 49 call StopVimInTerminal(buf) |
50 call delete('XtestTextpropPopup') | 50 call delete('XtestTextpropPopup') |
51 endfunc | 51 endfunc |
52 | 52 |
53 func Test_textprop_popup_corners() | |
54 let lines =<< trim END | |
55 call setline(1, range(1, 100)) | |
56 call setline(50, 'now working with some longer text here') | |
57 50 | |
58 normal zz | |
59 set scrolloff=0 | |
60 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) | |
61 call prop_add(50, 23, #{ | |
62 \ length: 6, | |
63 \ type: 'popupMarker', | |
64 \ }) | |
65 let winid = popup_create('bottom left', #{ | |
66 \ pos: 'botleft', | |
67 \ textprop: 'popupMarker', | |
68 \ padding: [0,1,0,1], | |
69 \ }) | |
70 let winid = popup_create('bottom right', #{ | |
71 \ pos: 'botright', | |
72 \ textprop: 'popupMarker', | |
73 \ border: [], | |
74 \ padding: [0,1,0,1], | |
75 \ }) | |
76 let winid = popup_create('top left', #{ | |
77 \ pos: 'topleft', | |
78 \ textprop: 'popupMarker', | |
79 \ border: [], | |
80 \ padding: [0,1,0,1], | |
81 \ }) | |
82 let winid = popup_create('top right', #{ | |
83 \ pos: 'topright', | |
84 \ textprop: 'popupMarker', | |
85 \ padding: [0,1,0,1], | |
86 \ }) | |
87 END | |
88 call writefile(lines, 'XtestTextpropPopupCorners') | |
89 let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12}) | |
90 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {}) | |
91 | |
92 call term_sendkeys(buf, "0dw") | |
93 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {}) | |
94 | |
95 call term_sendkeys(buf, "46Goextra\<Esc>") | |
96 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {}) | |
97 | |
98 call term_sendkeys(buf, "u") | |
99 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {}) | |
100 | |
101 " clean up | |
102 call StopVimInTerminal(buf) | |
103 call delete('XtestTextpropPopupCorners') | |
104 endfunc | |
105 | |
53 | 106 |
54 " vim: shiftwidth=2 sts=2 | 107 " vim: shiftwidth=2 sts=2 |