Mercurial > vim
changeset 34771:3d063c753d40 v9.1.0262
patch 9.1.0262: Test for TextChanged is flaky with ASAN
Commit: https://github.com/vim/vim/commit/4a65391ca273f2eca84f5ec7bd846693232dfacc
Author: zeertzjq <zeertzjq@outlook.com>
Date: Thu Apr 4 21:33:36 2024 +0200
patch 9.1.0262: Test for TextChanged is flaky with ASAN
Problem: Test for TextChanged is flaky with ASAN.
Solution: Wait for the file to be non-empty.
(zeertzjq)
closes: #14404
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 04 Apr 2024 21:45:03 +0200 |
parents | f03486fc4b8c |
children | cd738b9a790a |
files | src/testdir/test_autocmd.vim src/version.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/testdir/test_autocmd.vim +++ b/src/testdir/test_autocmd.vim @@ -4486,7 +4486,7 @@ func Test_Changed_ChangedI() au TextChangedI <buffer> :call TextChangedAutocmd('I') nnoremap <CR> o<Esc> - call writefile([''], 'XTextChangedI3') + autocmd SafeState * ++once call writefile([''], 'XTextChangedI3') END call writefile(before, 'Xinit', 'D') @@ -4495,6 +4495,7 @@ func Test_Changed_ChangedI() \ {'term_rows': 10}) call assert_equal('running', term_getstatus(buf)) call WaitForAssert({-> assert_true(filereadable('XTextChangedI3'))}) + call WaitForAssert({-> assert_equal([''], readfile('XTextChangedI3'))}) " TextChanged should trigger if a mapping enters and leaves Insert mode. call term_sendkeys(buf, "\<CR>")