aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2023-03-04 14:19:53 +0800
committerGitHub <noreply@github.com>2023-03-04 14:19:53 +0800
commitde14f2c928f913d4fb617d693024eec5cf2223ec (patch)
tree34e2b7c7324382eb0058e1dffa2d1baa1ab2ae0d /src/nvim/testdir
parent446c353a507834a3cbe9007b06e7e0c2c46b5ac7 (diff)
parentb7d59649acf43c76cc72b25c04bcae926a40b4fe (diff)
downloadrneovim-de14f2c928f913d4fb617d693024eec5cf2223ec.tar.gz
rneovim-de14f2c928f913d4fb617d693024eec5cf2223ec.tar.bz2
rneovim-de14f2c928f913d4fb617d693024eec5cf2223ec.zip
Merge pull request #22506 from zeertzjq/vim-9.0.0013
vim-patch:9.0.{partial:0013,0016}: fix memory access errors
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_breakindent.vim10
-rw-r--r--src/nvim/testdir/test_edit.vim3
2 files changed, 8 insertions, 5 deletions
diff --git a/src/nvim/testdir/test_breakindent.vim b/src/nvim/testdir/test_breakindent.vim
index b61c9a570d..0d1753182e 100644
--- a/src/nvim/testdir/test_breakindent.vim
+++ b/src/nvim/testdir/test_breakindent.vim
@@ -10,7 +10,9 @@ CheckOption breakindent
source view_util.vim
source screendump.vim
-let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
+func SetUp()
+ let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
+endfunc
func s:screen_lines(lnum, width) abort
return ScreenLines([a:lnum, a:lnum + 2], a:width)
@@ -837,12 +839,12 @@ func Test_breakindent20_list()
call s:compare_lines(expect, lines)
" check formatlistpat indent with different list levels
let &l:flp = '^\s*\*\+\s\+'
- redraw!
%delete _
call setline(1, ['* Congress shall make no law',
\ '*** Congress shall make no law',
\ '**** Congress shall make no law'])
norm! 1gg
+ redraw!
let expect = [
\ "* Congress shall ",
\ " make no law ",
@@ -956,9 +958,9 @@ func Test_no_spurious_match()
let @/ = '\%>3v[y]'
redraw!
call searchcount().total->assert_equal(1)
+
" cleanup
set hls&vim
- let s:input = "\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
bwipeout!
endfunc
@@ -1023,8 +1025,6 @@ func Test_no_extra_indent()
endfunc
func Test_breakindent_column()
- " restore original
- let s:input ="\tabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOP"
call s:test_windows('setl breakindent breakindentopt=column:10')
redraw!
" 1) default: does not indent, too wide :(
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))})