diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2023-03-04 10:25:18 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2023-03-04 13:53:09 +0800 |
| commit | 0a897f89c52b92cb518dae1c92de22ca1d170d2a (patch) | |
| tree | 21a76a06b6a41eb99b23ff0fc41906c3e6c55226 /src/nvim/testdir/test_edit.vim | |
| parent | 446c353a507834a3cbe9007b06e7e0c2c46b5ac7 (diff) | |
| download | rneovim-0a897f89c52b92cb518dae1c92de22ca1d170d2a.tar.gz rneovim-0a897f89c52b92cb518dae1c92de22ca1d170d2a.tar.bz2 rneovim-0a897f89c52b92cb518dae1c92de22ca1d170d2a.zip | |
vim-patch:partial:9.0.0013: reproducing memory access errors can be difficult
Problem: Reproducing memory access errors can be difficult.
Solution: When testing, copy each line to allocated memory, so that valgrind
can detect accessing memory before and/or after it. Fix uncovered
problems.
https://github.com/vim/vim/commit/fa4873ccfc10e0f278dc46f39d00136fab059b19
Since test_override() is N/A, enable ml_get_alloc_lines when ASAN is
enabled instead, so it also applies to functional tests.
Use xstrdup() to copy the line as ml_line_len looks hard to port.
Squash the test changes from patch 9.0.0016.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'src/nvim/testdir/test_edit.vim')
| -rw-r--r-- | src/nvim/testdir/test_edit.vim | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_edit.vim b/src/nvim/testdir/test_edit.vim index 075f78ec76..e4c21d9932 100644 --- a/src/nvim/testdir/test_edit.vim +++ b/src/nvim/testdir/test_edit.vim @@ -1890,6 +1890,9 @@ func Test_edit_insertmode_ex_edit() call writefile(lines, 'Xtest_edit_insertmode_ex_edit') let buf = RunVimInTerminal('-S Xtest_edit_insertmode_ex_edit', #{rows: 6}) + " Somehow this can be very slow with valgrind. A separate TermWait() works + " better than a longer time with WaitForAssert() (why?) + call TermWait(buf, 1000) call WaitForAssert({-> assert_match('^-- INSERT --\s*$', term_getline(buf, 6))}) call term_sendkeys(buf, "\<C-B>\<C-L>") call WaitForAssert({-> assert_notmatch('^-- INSERT --\s*$', term_getline(buf, 6))}) |