Mercurial > vim
comparison src/testdir/test_cmdline.vim @ 20741:fa6f1c97813f v8.2.0923
patch 8.2.0923: cmdline test is slow
Commit: https://github.com/vim/vim/commit/c82dd86084581afa5113b0dd9ade7a631b89b4fc
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Jun 7 17:30:33 2020 +0200
patch 8.2.0923: cmdline test is slow
Problem: Cmdline test is slow.
Solution: Use WaitForAssert().
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 07 Jun 2020 17:45:03 +0200 |
parents | 0b4a9642b39c |
children | 49673325ca13 |
comparison
equal
deleted
inserted
replaced
20740:463de04e9d0e | 20741:fa6f1c97813f |
---|---|
1 " Tests for editing the command line. | 1 " Tests for editing the command line. |
2 | 2 |
3 source check.vim | 3 source check.vim |
4 source screendump.vim | 4 source screendump.vim |
5 source view_util.vim | 5 source view_util.vim |
6 source shared.vim | |
6 | 7 |
7 func Test_complete_tab() | 8 func Test_complete_tab() |
8 call writefile(['testfile'], 'Xtestfile') | 9 call writefile(['testfile'], 'Xtestfile') |
9 call feedkeys(":e Xtest\t\r", "tx") | 10 call feedkeys(":e Xtest\t\r", "tx") |
10 call assert_equal('testfile', getline(1)) | 11 call assert_equal('testfile', getline(1)) |
1192 au WinNew * smile | 1193 au WinNew * smile |
1193 [SCRIPT] | 1194 [SCRIPT] |
1194 call writefile(lines, 'XTest_cmdwin') | 1195 call writefile(lines, 'XTest_cmdwin') |
1195 | 1196 |
1196 let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18}) | 1197 let buf = RunVimInTerminal('-S XTest_cmdwin', {'rows': 18}) |
1197 call TermWait(buf, 1000) | |
1198 " open cmdwin | 1198 " open cmdwin |
1199 call term_sendkeys(buf, "q:") | 1199 call term_sendkeys(buf, "q:") |
1200 call TermWait(buf, 500) | 1200 call WaitForAssert({-> assert_match('-- More --', term_getline(buf, 18))}) |
1201 " quit more prompt for :smile command | 1201 " quit more prompt for :smile command |
1202 call term_sendkeys(buf, "q") | 1202 call term_sendkeys(buf, "q") |
1203 call TermWait(buf, 500) | 1203 call WaitForAssert({-> assert_match('^$', term_getline(buf, 18))}) |
1204 " execute a simple command | 1204 " execute a simple command |
1205 call term_sendkeys(buf, "aecho 'done'\<CR>") | 1205 call term_sendkeys(buf, "aecho 'done'\<CR>") |
1206 call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {}) | 1206 call VerifyScreenDump(buf, 'Test_cmdwin_interrupted', {}) |
1207 | 1207 |
1208 " clean up | 1208 " clean up |