annotate src/testdir/test_conceal.vim @ 16720:9c90cf08cfa8 v8.1.1362

patch 8.1.1362: code and data in tests can be hard to read commit https://github.com/vim/vim/commit/c79745a82faeb5a6058e915ca49a4c69fa60ea01 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 20 22:12:34 2019 +0200 patch 8.1.1362: code and data in tests can be hard to read Problem: Code and data in tests can be hard to read. Solution: Use the new heredoc style. (Yegappan Lakshmanan, closes https://github.com/vim/vim/issues/4400)
author Bram Moolenaar <Bram@vim.org>
date Mon, 20 May 2019 22:15:06 +0200
parents 5b0f37d844b3
children ba7727889385
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15426
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
1 " Tests for 'conceal'.
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
2 " Also see test88.in (should be converted to a test function here).
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
3
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
4 if !has('conceal')
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 finish
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6 endif
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 source screendump.vim
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9 if !CanRunVimInTerminal()
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 finish
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 endif
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
13 func Test_conceal_two_windows()
16720
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
14 let code =<< trim [CODE]
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
15 let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"]
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
16 call setline(1, lines)
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
17 syntax match test /|hidden|/ conceal
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
18 set conceallevel=2
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
19 set concealcursor=
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
20 exe "normal /here\r"
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
21 new
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
22 call setline(1, lines)
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
23 call setline(4, "Second window")
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
24 syntax match test /|hidden|/ conceal
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
25 set conceallevel=2
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
26 set concealcursor=nc
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
27 exe "normal /here\r"
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
28 [CODE]
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
29
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
30 call writefile(code, 'XTest_conceal')
15426
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 " Check that cursor line is concealed
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 let buf = RunVimInTerminal('-S XTest_conceal', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
33 call VerifyScreenDump(buf, 'Test_conceal_two_windows_01', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
34
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 " Check that with concealed text vertical cursor movement is correct.
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
36 call term_sendkeys(buf, "k")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
37 call VerifyScreenDump(buf, 'Test_conceal_two_windows_02', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
39 " Check that with cursor line is not concealed
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
40 call term_sendkeys(buf, "j")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 call term_sendkeys(buf, ":set concealcursor=\r")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
42 call VerifyScreenDump(buf, 'Test_conceal_two_windows_03', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
43
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 " Check that with cursor line is not concealed when moving cursor down
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
45 call term_sendkeys(buf, "j")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
46 call VerifyScreenDump(buf, 'Test_conceal_two_windows_04', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
48 " Check that with cursor line is not concealed when switching windows
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
49 call term_sendkeys(buf, "\<C-W>\<C-W>")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
50 call VerifyScreenDump(buf, 'Test_conceal_two_windows_05', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
51
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
52 " Check that with cursor line is only concealed in Normal mode
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 call term_sendkeys(buf, ":set concealcursor=n\r")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06n', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 call term_sendkeys(buf, "a")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06i', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57 call term_sendkeys(buf, "\<Esc>/e")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
58 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06c', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
59 call term_sendkeys(buf, "\<Esc>v")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
60 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06v', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
61 call term_sendkeys(buf, "\<Esc>")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
62
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
63 " Check that with cursor line is only concealed in Insert mode
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
64 call term_sendkeys(buf, ":set concealcursor=i\r")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
65 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07n', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
66 call term_sendkeys(buf, "a")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
67 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07i', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
68 call term_sendkeys(buf, "\<Esc>/e")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
69 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07c', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
70 call term_sendkeys(buf, "\<Esc>v")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
71 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07v', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
72 call term_sendkeys(buf, "\<Esc>")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
73
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
74 " Check that with cursor line is only concealed in Command mode
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
75 call term_sendkeys(buf, ":set concealcursor=c\r")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
76 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08n', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
77 call term_sendkeys(buf, "a")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
78 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08i', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
79 call term_sendkeys(buf, "\<Esc>/e")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
80 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08c', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
81 call term_sendkeys(buf, "\<Esc>v")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
82 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08v', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
83 call term_sendkeys(buf, "\<Esc>")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
84
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
85 " Check that with cursor line is only concealed in Visual mode
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
86 call term_sendkeys(buf, ":set concealcursor=v\r")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
87 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09n', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
88 call term_sendkeys(buf, "a")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
89 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09i', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
90 call term_sendkeys(buf, "\<Esc>/e")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
91 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09c', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
92 call term_sendkeys(buf, "\<Esc>v")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
93 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09v', {})
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
94 call term_sendkeys(buf, "\<Esc>")
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
95
15434
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
96 " Check moving the cursor while in insert mode.
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
97 call term_sendkeys(buf, ":set concealcursor=\r")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
98 call term_sendkeys(buf, "a")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
99 call VerifyScreenDump(buf, 'Test_conceal_two_windows_10', {})
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
100 call term_sendkeys(buf, "\<Down>")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
101 call VerifyScreenDump(buf, 'Test_conceal_two_windows_11', {})
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
102 call term_sendkeys(buf, "\<Esc>")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
103
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
104 " Check the "o" command
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
105 call VerifyScreenDump(buf, 'Test_conceal_two_windows_12', {})
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
106 call term_sendkeys(buf, "o")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
107 call VerifyScreenDump(buf, 'Test_conceal_two_windows_13', {})
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
108 call term_sendkeys(buf, "\<Esc>")
80e79573dd6e patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents: 15426
diff changeset
109
15426
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
110 " clean up
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
111 call StopVimInTerminal(buf)
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
112 call delete('XTest_conceal')
8b78878311e0 patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
113 endfunc
15476
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
114
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
115 func Test_conceal_with_cursorline()
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
116 " Opens a help window, where 'conceal' is set, switches to the other window
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
117 " where 'cursorline' needs to be updated when the cursor moves.
16720
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
118 let code =<< trim [CODE]
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
119 set cursorline
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
120 normal othis is a test
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
121 new
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
122 call setline(1, ["one", "two", "three", "four", "five"])
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
123 set ft=help
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
124 normal M
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
125 [CODE]
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
126
9c90cf08cfa8 patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents: 15476
diff changeset
127 call writefile(code, 'XTest_conceal_cul')
15476
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
128 let buf = RunVimInTerminal('-S XTest_conceal_cul', {})
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
129 call VerifyScreenDump(buf, 'Test_conceal_cul_01', {})
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
130
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
131 call term_sendkeys(buf, ":wincmd w\r")
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
132 call VerifyScreenDump(buf, 'Test_conceal_cul_02', {})
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
133
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
134 call term_sendkeys(buf, "k")
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
135 call VerifyScreenDump(buf, 'Test_conceal_cul_03', {})
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
136
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
137 " clean up
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
138 call StopVimInTerminal(buf)
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
139 call delete('XTest_conceal_cul')
5b0f37d844b3 patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents: 15434
diff changeset
140 endfunc