Mercurial > vim
comparison src/testdir/test_cursorline.vim @ 19954:c087099e9163 v8.2.0533
patch 8.2.0533: tests using term_wait() can still be flaky
Commit: https://github.com/vim/vim/commit/6a2c5a7dd5c9215cc030d5ea6e4616d782c091dd
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Apr 8 21:50:25 2020 +0200
patch 8.2.0533: tests using term_wait() can still be flaky
Problem: Tests using term_wait() can still be flaky.
Solution: Increase the wait time when rerunning a test. (James McCoy,
closes #5899) Halve the initial times to make tests run faster
when there is no rerun.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 08 Apr 2020 22:00:05 +0200 |
parents | 1f5571e7f012 |
children | 08940efa6b4e |
comparison
equal
deleted
inserted
replaced
19953:313ad6f6fdb5 | 19954:c087099e9163 |
---|---|
133 call extend(lines, ["call append(0, ".. string(file_content).. ')']) | 133 call extend(lines, ["call append(0, ".. string(file_content).. ')']) |
134 call extend(lines, lines2) | 134 call extend(lines, lines2) |
135 call writefile(lines, filename) | 135 call writefile(lines, filename) |
136 " basic test | 136 " basic test |
137 let buf = RunVimInTerminal('-S '. filename, #{rows: 20}) | 137 let buf = RunVimInTerminal('-S '. filename, #{rows: 20}) |
138 call term_wait(buf) | 138 call TermWait(buf) |
139 call VerifyScreenDump(buf, 'Test_'. filename. '_1', {}) | 139 call VerifyScreenDump(buf, 'Test_'. filename. '_1', {}) |
140 call term_sendkeys(buf, "fagj") | 140 call term_sendkeys(buf, "fagj") |
141 call term_wait(buf) | 141 call TermWait(buf) |
142 call VerifyScreenDump(buf, 'Test_'. filename. '_2', {}) | 142 call VerifyScreenDump(buf, 'Test_'. filename. '_2', {}) |
143 call term_sendkeys(buf, "gj") | 143 call term_sendkeys(buf, "gj") |
144 call term_wait(buf) | 144 call TermWait(buf) |
145 call VerifyScreenDump(buf, 'Test_'. filename. '_3', {}) | 145 call VerifyScreenDump(buf, 'Test_'. filename. '_3', {}) |
146 call term_sendkeys(buf, "gj") | 146 call term_sendkeys(buf, "gj") |
147 call term_wait(buf) | 147 call TermWait(buf) |
148 call VerifyScreenDump(buf, 'Test_'. filename. '_4', {}) | 148 call VerifyScreenDump(buf, 'Test_'. filename. '_4', {}) |
149 call term_sendkeys(buf, "gj") | 149 call term_sendkeys(buf, "gj") |
150 call term_wait(buf) | 150 call TermWait(buf) |
151 call VerifyScreenDump(buf, 'Test_'. filename. '_5', {}) | 151 call VerifyScreenDump(buf, 'Test_'. filename. '_5', {}) |
152 call term_sendkeys(buf, "gj") | 152 call term_sendkeys(buf, "gj") |
153 call term_wait(buf) | 153 call TermWait(buf) |
154 call VerifyScreenDump(buf, 'Test_'. filename. '_6', {}) | 154 call VerifyScreenDump(buf, 'Test_'. filename. '_6', {}) |
155 " test with set list and cursorlineopt containing number | 155 " test with set list and cursorlineopt containing number |
156 call term_sendkeys(buf, "gg0") | 156 call term_sendkeys(buf, "gg0") |
157 call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>") | 157 call term_sendkeys(buf, ":set list cursorlineopt+=number listchars=space:-\<cr>") |
158 call VerifyScreenDump(buf, 'Test_'. filename. '_7', {}) | 158 call VerifyScreenDump(buf, 'Test_'. filename. '_7', {}) |
159 call term_sendkeys(buf, "fagj") | 159 call term_sendkeys(buf, "fagj") |
160 call term_wait(buf) | 160 call TermWait(buf) |
161 call VerifyScreenDump(buf, 'Test_'. filename. '_8', {}) | 161 call VerifyScreenDump(buf, 'Test_'. filename. '_8', {}) |
162 call term_sendkeys(buf, "gj") | 162 call term_sendkeys(buf, "gj") |
163 call term_wait(buf) | 163 call TermWait(buf) |
164 call VerifyScreenDump(buf, 'Test_'. filename. '_9', {}) | 164 call VerifyScreenDump(buf, 'Test_'. filename. '_9', {}) |
165 call term_sendkeys(buf, "gj") | 165 call term_sendkeys(buf, "gj") |
166 call term_wait(buf) | 166 call TermWait(buf) |
167 call VerifyScreenDump(buf, 'Test_'. filename. '_10', {}) | 167 call VerifyScreenDump(buf, 'Test_'. filename. '_10', {}) |
168 call term_sendkeys(buf, "gj") | 168 call term_sendkeys(buf, "gj") |
169 call term_wait(buf) | 169 call TermWait(buf) |
170 call VerifyScreenDump(buf, 'Test_'. filename. '_11', {}) | 170 call VerifyScreenDump(buf, 'Test_'. filename. '_11', {}) |
171 call term_sendkeys(buf, "gj") | 171 call term_sendkeys(buf, "gj") |
172 call term_wait(buf) | 172 call TermWait(buf) |
173 call VerifyScreenDump(buf, 'Test_'. filename. '_12', {}) | 173 call VerifyScreenDump(buf, 'Test_'. filename. '_12', {}) |
174 if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent") | 174 if exists("+foldcolumn") && exists("+signcolumn") && exists("+breakindent") |
175 " test with set foldcolumn signcoloumn and breakindent | 175 " test with set foldcolumn signcoloumn and breakindent |
176 call term_sendkeys(buf, "gg0") | 176 call term_sendkeys(buf, "gg0") |
177 call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>") | 177 call term_sendkeys(buf, ":set breakindent foldcolumn=2 signcolumn=yes\<cr>") |
178 call VerifyScreenDump(buf, 'Test_'. filename. '_13', {}) | 178 call VerifyScreenDump(buf, 'Test_'. filename. '_13', {}) |
179 call term_sendkeys(buf, "fagj") | 179 call term_sendkeys(buf, "fagj") |
180 call term_wait(buf) | 180 call TermWait(buf) |
181 call VerifyScreenDump(buf, 'Test_'. filename. '_14', {}) | 181 call VerifyScreenDump(buf, 'Test_'. filename. '_14', {}) |
182 call term_sendkeys(buf, "gj") | 182 call term_sendkeys(buf, "gj") |
183 call term_wait(buf) | 183 call TermWait(buf) |
184 call VerifyScreenDump(buf, 'Test_'. filename. '_15', {}) | 184 call VerifyScreenDump(buf, 'Test_'. filename. '_15', {}) |
185 call term_sendkeys(buf, "gj") | 185 call term_sendkeys(buf, "gj") |
186 call term_wait(buf) | 186 call TermWait(buf) |
187 call VerifyScreenDump(buf, 'Test_'. filename. '_16', {}) | 187 call VerifyScreenDump(buf, 'Test_'. filename. '_16', {}) |
188 call term_sendkeys(buf, "gj") | 188 call term_sendkeys(buf, "gj") |
189 call term_wait(buf) | 189 call TermWait(buf) |
190 call VerifyScreenDump(buf, 'Test_'. filename. '_17', {}) | 190 call VerifyScreenDump(buf, 'Test_'. filename. '_17', {}) |
191 call term_sendkeys(buf, "gj") | 191 call term_sendkeys(buf, "gj") |
192 call term_wait(buf) | 192 call TermWait(buf) |
193 call VerifyScreenDump(buf, 'Test_'. filename. '_18', {}) | 193 call VerifyScreenDump(buf, 'Test_'. filename. '_18', {}) |
194 endif | 194 endif |
195 | 195 |
196 call StopVimInTerminal(buf) | 196 call StopVimInTerminal(buf) |
197 call delete(filename) | 197 call delete(filename) |