aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir/test_ex_mode.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-06-11 21:07:47 -0400
committerGitHub <noreply@github.com>2021-06-11 21:07:47 -0400
commitd09b8ad715ca327766ed9f32c45e1776dae679f4 (patch)
tree1137d78266238d2e3de42c3f1fbca8107c57e8f3 /src/nvim/testdir/test_ex_mode.vim
parenta9b8c780fe3b74cec12747101e351ba7d13451f1 (diff)
parent2644fe5b7c7dd0381543da56b9444bda79f14676 (diff)
downloadrneovim-d09b8ad715ca327766ed9f32c45e1776dae679f4.tar.gz
rneovim-d09b8ad715ca327766ed9f32c45e1776dae679f4.tar.bz2
rneovim-d09b8ad715ca327766ed9f32c45e1776dae679f4.zip
Merge pull request #14761 from janlazo/vim-8.2.2966
vim-patch:8.2.{1702,2422,2966,2971,2974}
Diffstat (limited to 'src/nvim/testdir/test_ex_mode.vim')
-rw-r--r--src/nvim/testdir/test_ex_mode.vim19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_ex_mode.vim b/src/nvim/testdir/test_ex_mode.vim
index f70cb261e0..1c645ad0f8 100644
--- a/src/nvim/testdir/test_ex_mode.vim
+++ b/src/nvim/testdir/test_ex_mode.vim
@@ -1,5 +1,8 @@
" Test editing line in Ex mode (see :help Q and :help gQ).
+source check.vim
+source shared.vim
+
" Helper function to test editing line in Q Ex mode
func Ex_Q(cmd)
" Is there a simpler way to test editing Ex line?
@@ -79,4 +82,20 @@ func Test_ex_mode_errors()
quit
endfunc
+func Test_ex_mode_count_overflow()
+ " this used to cause a crash
+ let lines =<< trim END
+ call feedkeys("\<Esc>Q\<CR>")
+ v9|9silent! vi|333333233333y32333333%O
+ call writefile(['done'], 'Xdidexmode')
+ qall!
+ END
+ call writefile(lines, 'Xexmodescript')
+ call assert_equal(1, RunVim([], [], '-e -s -S Xexmodescript -c qa'))
+ call assert_equal(['done'], readfile('Xdidexmode'))
+
+ call delete('Xdidexmode')
+ call delete('Xexmodescript')
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab