comparison src/testdir/test_popup.vim @ 29249:0b47ef4e19b8 v8.2.5143

patch 8.2.5143: some tests fail when using valgrind Commit: https://github.com/vim/vim/commit/37bb3b111d08ce420e3cfd6ea3da3ed7428fbed1 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 21 17:40:47 2022 +0100 patch 8.2.5143: some tests fail when using valgrind Problem: Some tests fail when using valgrind. Spurious leak reports. Solution: Use WaitForAssert(). Avoid failing fork/exec. Skip tests where a job is killed when running valgrind.
author Bram Moolenaar <Bram@vim.org>
date Tue, 21 Jun 2022 18:45:08 +0200
parents 45c182c4f7e9
children 86eac190ec42
comparison
equal deleted inserted replaced
29248:6a718a4e17ce 29249:0b47ef4e19b8
1175 vim 1175 vim
1176 victory 1176 victory
1177 END 1177 END
1178 call writefile(lines, 'Xtest1') 1178 call writefile(lines, 'Xtest1')
1179 let buf = RunVimInTerminal('--cmd "set rightleft" Xtest1', {}) 1179 let buf = RunVimInTerminal('--cmd "set rightleft" Xtest1', {})
1180 call term_wait(buf)
1181 call term_sendkeys(buf, "Go\<C-P>") 1180 call term_sendkeys(buf, "Go\<C-P>")
1182 call VerifyScreenDump(buf, 'Test_pum_rightleft_01', {'rows': 8}) 1181 call VerifyScreenDump(buf, 'Test_pum_rightleft_01', {'rows': 8})
1183 call term_sendkeys(buf, "\<C-P>\<C-Y>") 1182 call term_sendkeys(buf, "\<C-P>\<C-Y>")
1184 call term_wait(buf) 1183 call TermWait(buf, 30)
1185 redraw! 1184 redraw!
1186 call assert_match('\s*miv', Screenline(5)) 1185 call WaitForAssert({-> assert_match('\s*miv', Screenline(5))})
1187 1186
1188 " Test for expanding tabs to spaces in the popup menu 1187 " Test for expanding tabs to spaces in the popup menu
1189 let lines =<< trim END 1188 let lines =<< trim END
1190 one two 1189 one two
1191 one three 1190 one three
1192 four 1191 four
1193 END 1192 END
1194 call writefile(lines, 'Xtest2') 1193 call writefile(lines, 'Xtest2')
1195 call term_sendkeys(buf, "\<Esc>:e! Xtest2\<CR>") 1194 call term_sendkeys(buf, "\<Esc>:e! Xtest2\<CR>")
1196 call term_wait(buf) 1195 call TermWait(buf, 30)
1197 call term_sendkeys(buf, "Goone\<C-X>\<C-L>") 1196 call term_sendkeys(buf, "Goone\<C-X>\<C-L>")
1198 call term_wait(buf) 1197 call TermWait(buf, 30)
1199 redraw! 1198 redraw!
1200 call VerifyScreenDump(buf, 'Test_pum_rightleft_02', {'rows': 7}) 1199 call VerifyScreenDump(buf, 'Test_pum_rightleft_02', {'rows': 7})
1201 call term_sendkeys(buf, "\<C-Y>") 1200 call term_sendkeys(buf, "\<C-Y>")
1202 call term_wait(buf) 1201 call TermWait(buf, 30)
1203 redraw! 1202 redraw!
1204 call assert_match('\s*eerht eno', Screenline(4)) 1203 call WaitForAssert({-> assert_match('\s*eerht eno', Screenline(4))})
1205 1204
1206 call StopVimInTerminal(buf) 1205 call StopVimInTerminal(buf)
1207 call delete('Xtest1') 1206 call delete('Xtest1')
1208 call delete('Xtest2') 1207 call delete('Xtest2')
1209 endfunc 1208 endfunc
1216 two 1215 two
1217 three 1216 three
1218 END 1217 END
1219 call writefile(lines, 'Xtest1') 1218 call writefile(lines, 'Xtest1')
1220 let buf = RunVimInTerminal('--cmd "set pumheight=2" Xtest1', {}) 1219 let buf = RunVimInTerminal('--cmd "set pumheight=2" Xtest1', {})
1221 call term_wait(buf) 1220 call TermWait(buf)
1222 call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>") 1221 call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>")
1223 call VerifyScreenDump(buf, 'Test_pum_scrollbar_01', {'rows': 7}) 1222 call VerifyScreenDump(buf, 'Test_pum_scrollbar_01', {'rows': 7})
1224 call term_sendkeys(buf, "\<C-E>\<Esc>dd") 1223 call term_sendkeys(buf, "\<C-E>\<Esc>dd")
1225 call term_wait(buf) 1224 call TermWait(buf)
1226 1225
1227 if has('rightleft') 1226 if has('rightleft')
1228 call term_sendkeys(buf, ":set rightleft\<CR>") 1227 call term_sendkeys(buf, ":set rightleft\<CR>")
1229 call term_wait(buf) 1228 call TermWait(buf)
1230 call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>") 1229 call term_sendkeys(buf, "Go\<C-P>\<C-P>\<C-P>")
1231 call VerifyScreenDump(buf, 'Test_pum_scrollbar_02', {'rows': 7}) 1230 call VerifyScreenDump(buf, 'Test_pum_scrollbar_02', {'rows': 7})
1232 endif 1231 endif
1233 1232
1234 call StopVimInTerminal(buf) 1233 call StopVimInTerminal(buf)