annotate src/testdir/test_popupwin_textprop.vim @ 31849:dbec60b8c253 v9.0.1257

patch 9.0.1257: code style is not check in test scripts Commit: https://github.com/vim/vim/commit/94722c510745a0cfd494c51625a514b92dd2bfb2 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 28 19:19:03 2023 +0000 patch 9.0.1257: code style is not check in test scripts Problem: Code style is not check in test scripts. Solution: Add basic code style check for test files.
author Bram Moolenaar <Bram@vim.org>
date Sat, 28 Jan 2023 20:30:04 +0100
parents 457ea0570b6f
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Tests for popup windows for text properties
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3 source check.vim
18763
49b78d6465e5 patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Bram Moolenaar <Bram@vim.org>
parents: 18629
diff changeset
4 CheckFeature popupwin
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 CheckFeature textprop
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 source screendump.vim
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 CheckScreendump
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 func Test_textprop_popup()
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let lines =<< trim END
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 call setline(1, range(1, 100))
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 call setline(50, 'some text to work with')
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
14 50
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 normal zz
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 set scrolloff=0
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
17 call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')})
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 call prop_add(50, 11, #{
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
19 \ length: 7,
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 \ type: 'popupMarker',
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
21 \ bufnr: bufnr('%'),
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ })
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 let winid = popup_create('the text', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
24 \ pos: 'botleft',
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ textprop: 'popupMarker',
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \ border: [],
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ padding: [0,1,0,1],
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
28 \ close: 'click',
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ })
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 END
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
31 call writefile(lines, 'XtestTextpropPopup', 'D')
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 call VerifyScreenDump(buf, 'Test_popup_textprop_01', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 call term_sendkeys(buf, "zt")
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 call VerifyScreenDump(buf, 'Test_popup_textprop_02', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 call term_sendkeys(buf, "zzIawe\<Esc>")
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 call VerifyScreenDump(buf, 'Test_popup_textprop_03', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 call term_sendkeys(buf, "0dw")
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 call VerifyScreenDump(buf, 'Test_popup_textprop_04', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 call term_sendkeys(buf, "Oinserted\<Esc>")
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 call VerifyScreenDump(buf, 'Test_popup_textprop_05', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 call term_sendkeys(buf, "k2dd")
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 call VerifyScreenDump(buf, 'Test_popup_textprop_06', {})
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
50 call term_sendkeys(buf, "4\<C-E>")
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
51 call VerifyScreenDump(buf, 'Test_popup_textprop_07', {})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
52
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 " clean up
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 call StopVimInTerminal(buf)
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 endfunc
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
57 func Test_textprop_popup_corners()
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
58 let lines =<< trim END
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
59 call setline(1, range(1, 100))
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
60 call setline(50, 'now working with some longer text here')
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
61 50
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
62 normal zz
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
63 set scrolloff=0
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
64 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
65 call prop_add(50, 23, #{
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
66 \ length: 6,
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
67 \ type: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
68 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
69 let winid = popup_create('bottom left', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
70 \ pos: 'botleft',
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
71 \ textprop: 'popupMarker',
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
72 \ textpropwin: win_getid(),
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
73 \ padding: [0,1,0,1],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
74 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
75 let winid = popup_create('bottom right', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
76 \ pos: 'botright',
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
77 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
78 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
79 \ padding: [0,1,0,1],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
80 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
81 let winid = popup_create('top left', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
82 \ pos: 'topleft',
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
83 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
84 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
85 \ padding: [0,1,0,1],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
86 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
87 let winid = popup_create('top right', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
88 \ pos: 'topright',
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
89 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
90 \ padding: [0,1,0,1],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
91 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
92 END
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
93 call writefile(lines, 'XtestTextpropPopupCorners', 'D')
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
94 let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
95 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
96
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
97 call term_sendkeys(buf, "0dw")
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
98 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
99
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
100 call term_sendkeys(buf, "46Goextra\<Esc>")
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
101 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
102
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
103 call term_sendkeys(buf, "u")
17877
642832e45388 patch 8.1.1935: test for text property popup window is flaky
Bram Moolenaar <Bram@vim.org>
parents: 17875
diff changeset
104 call term_sendkeys(buf, ":\<CR>")
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
105 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {})
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
106
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
107 call term_sendkeys(buf, ":vsplit foo\<CR>")
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
108 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_5', {})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
109
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
110 call term_sendkeys(buf, ":only!\<CR>")
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
111 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_6', {})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
112
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
113 " clean up
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
114 call StopVimInTerminal(buf)
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
115 endfunc
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
116
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
117 func Test_textprop_popup_offsets()
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
118 let lines =<< trim END
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
119 call setline(1, range(1, 100))
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
120 call setline(50, 'now working with some longer text here')
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
121 50
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
122 normal zz
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
123 set scrolloff=0
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
124 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
125 call prop_add(50, 23, #{
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
126 \ length: 6,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
127 \ type: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
128 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
129 let winid = popup_create('bottom left', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
130 \ pos: 'botleft',
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
131 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
132 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
133 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
134 \ padding: [0,1,0,1],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
135 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
136 let winid = popup_create('bottom right', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
137 \ pos: 'botright',
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
138 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
139 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
140 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
141 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
142 \ padding: [0,1,0,1],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
143 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
144 let winid = popup_create('top left', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
145 \ pos: 'topleft',
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
146 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
147 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
148 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
149 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
150 \ padding: [0,1,0,1],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
151 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
152 let winid = popup_create('top right', #{
31849
dbec60b8c253 patch 9.0.1257: code style is not check in test scripts
Bram Moolenaar <Bram@vim.org>
parents: 30592
diff changeset
153 \ pos: 'topright',
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
154 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
155 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
156 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
157 \ padding: [0,1,0,1],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
158 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
159 END
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
160 call writefile(lines, 'XtestTextpropPopupOffset', 'D')
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
161 let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
162 call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
163
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
164 " test that removing the text property closes the popups
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
165 call term_sendkeys(buf, ":call prop_clear(50)\<CR>")
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
166 call VerifyScreenDump(buf, 'Test_popup_textprop_off_2', {})
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
167
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
168 " clean up
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
169 call StopVimInTerminal(buf)
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
170 endfunc
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
171
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
172
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
173 " vim: shiftwidth=2 sts=2