Mercurial > vim
comparison src/testdir/test_excmd.vim @ 27072:0878d7c64140 v8.2.4065
patch 8.2.4065: computation overflow with large cound for :yank
Commit: https://github.com/vim/vim/commit/3cf21b305104e91a28e4ce3a473672b2e88a9469
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Jan 11 19:34:16 2022 +0000
patch 8.2.4065: computation overflow with large cound for :yank
Problem: Computation overflow with large cound for :yank.
Solution: Avoid an overflow.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 11 Jan 2022 20:45:02 +0100 |
parents | a2335ec31abc |
children | 367439b95aba |
comparison
equal
deleted
inserted
replaced
27071:04adc77bb4b8 | 27072:0878d7c64140 |
---|---|
702 func Test_address_line_overflow() | 702 func Test_address_line_overflow() |
703 if v:sizeoflong < 8 | 703 if v:sizeoflong < 8 |
704 throw 'Skipped: only works with 64 bit long ints' | 704 throw 'Skipped: only works with 64 bit long ints' |
705 endif | 705 endif |
706 new | 706 new |
707 call setline(1, 'text') | 707 call setline(1, range(100)) |
708 call assert_fails('|.44444444444444444444444', 'E1247:') | 708 call assert_fails('|.44444444444444444444444', 'E1247:') |
709 call assert_fails('|.9223372036854775806', 'E1247:') | 709 call assert_fails('|.9223372036854775806', 'E1247:') |
710 | |
711 $ | |
712 yank 77777777777777777777 | |
713 call assert_equal("99\n", @") | |
714 | |
710 bwipe! | 715 bwipe! |
711 endfunc | 716 endfunc |
712 | 717 |
713 | 718 |
714 " vim: shiftwidth=2 sts=2 expandtab | 719 " vim: shiftwidth=2 sts=2 expandtab |