aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-16 13:39:20 +0800
committerGitHub <noreply@github.com>2024-07-16 05:39:20 +0000
commit37c7c7547a09cb6fb391f739d08290b782429494 (patch)
tree5da6b7c11f2b566d9cae69e9fd1ab6140f0db493
parenta553b3687668d055e4c2703fce2aea3ae1140374 (diff)
downloadrneovim-37c7c7547a09cb6fb391f739d08290b782429494.tar.gz
rneovim-37c7c7547a09cb6fb391f739d08290b782429494.tar.bz2
rneovim-37c7c7547a09cb6fb391f739d08290b782429494.zip
vim-patch:8.1.1106: no test for 'writedelay' (#29736)
Problem: No test for 'writedelay'. Solution: Add a test. https://github.com/vim/vim/commit/449ac47f931c99188575037ddfc5ee96f5200d2f Co-authored-by: Bram Moolenaar <Bram@vim.org>
-rw-r--r--test/old/testdir/test_options.vim25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/old/testdir/test_options.vim b/test/old/testdir/test_options.vim
index 26b4f64487..d0ae33605b 100644
--- a/test/old/testdir/test_options.vim
+++ b/test/old/testdir/test_options.vim
@@ -1367,6 +1367,31 @@ func Test_local_scrolloff()
set siso&
endfunc
+func Test_writedelay()
+ CheckFunction reltimefloat
+
+ new
+ call setline(1, 'empty')
+ " Nvim: 'writedelay' is applied per screen line.
+ " Create 7 vertical splits first.
+ vs | vs | vs | vs | vs | vs
+ redraw
+ set writedelay=10
+ let start = reltime()
+ " call setline(1, repeat('x', 70))
+ " Nvim: enable 'writedelay' per screen line.
+ " In each of the 7 vertical splits, 10 screen lines need to be drawn.
+ set redrawdebug+=line
+ call setline(1, repeat(['x'], 10))
+ redraw
+ let elapsed = reltimefloat(reltime(start))
+ set writedelay=0
+ " With 'writedelay' set should take at least 30 * 10 msec
+ call assert_inrange(30 * 0.01, 999.0, elapsed)
+
+ bwipe!
+endfunc
+
func Test_visualbell()
set belloff=
set visualbell