Skip to content

Commit

Permalink
patch 9.1.0262: Test for TextChanged is flaky with ASAN
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
zeertzjq authored and chrisbra committed Apr 4, 2024
1 parent 3e33650 commit 4a65391
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/testdir/test_autocmd.vim
Expand Up @@ -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')
Expand All @@ -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>")
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
262,
/**/
261,
/**/
Expand Down

0 comments on commit 4a65391

Please sign in to comment.