comparison src/testdir/test_normal.vim @ 26256:92fbed13ca4d v8.2.3659

patch 8.2.3659: integer overflow with large line number Commit: https://github.com/vim/vim/commit/03725c5795ae5b8c14da4a39cd0ce723c6dd4304 Author: Bram Moolenaar <Bram@vim.org> Date: Wed Nov 24 12:17:53 2021 +0000 patch 8.2.3659: integer overflow with large line number Problem: Integer overflow with large line number. Solution: Check for overflow. (closes https://github.com/vim/vim/issues/9202)
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Nov 2021 13:30:03 +0100
parents 9a8e9383e4cd
children 7eaf61a67d18
comparison
equal deleted inserted replaced
26255:c69a537bd421 26256:92fbed13ca4d
3517 norm! gj 3517 norm! gj
3518 call assert_equal([0,2,25,0], getpos('.')) 3518 call assert_equal([0,2,25,0], getpos('.'))
3519 bw! 3519 bw!
3520 endfunc 3520 endfunc
3521 3521
3522 func Test_normal_count_out_of_range()
3523 new
3524 call setline(1, 'text')
3525 normal 44444444444|
3526 call assert_equal(999999999, v:count)
3527 normal 444444444444|
3528 call assert_equal(999999999, v:count)
3529 normal 4444444444444|
3530 call assert_equal(999999999, v:count)
3531 normal 4444444444444444444|
3532 call assert_equal(999999999, v:count)
3533
3534 normal 9y99999999|
3535 call assert_equal(899999991, v:count)
3536 normal 10y99999999|
3537 call assert_equal(999999999, v:count)
3538 normal 44444444444y44444444444|
3539 call assert_equal(999999999, v:count)
3540 bwipe!
3541 endfunc
3542
3522 " vim: shiftwidth=2 sts=2 expandtab 3543 " vim: shiftwidth=2 sts=2 expandtab