1
0
forked from aniani/vim

patch 8.2.2512: Vim9: compiling error test sometimes fails

Problem:    Vim9: compiling error test sometimes fails.
Solution:   use WaitForAssert() instead of sleeping for a bit. (Dominique
            Pellé, closes #7837)
This commit is contained in:
Bram Moolenaar
2021-02-14 13:17:22 +01:00
parent 39f3b14110
commit 03dfde2b5f
4 changed files with 9 additions and 13 deletions

View File

@@ -31,18 +31,8 @@ def TestCompilingError()
call writefile(lines, 'XTest_compile_error')
var buf = RunVimInTerminal('-S XTest_compile_error',
{rows: 10, wait_for_ruler: 0})
var text = ''
for loop in range(100)
text = ''
for i in range(1, 9)
text ..= term_getline(buf, i)
endfor
if text =~ 'Variable not found: nothing'
break
endif
sleep 20m
endfor
assert_match('Error detected while compiling command line.*Fails.*Variable not found: nothing', text)
call WaitForAssert(() => assert_match('Error detected while compiling command line.*Fails.*Variable not found: nothing',
Term_getlines(buf, range(1, 9))))
# clean up
call StopVimInTerminal(buf)