vim-patch:9.1.0577: Unnecessary checks for v:sizeoflong in test_put.vim

Problem:  Unnecessary checks for v:sizeoflong in test_put.vim.  They are
          no longer necessary as patch 8.2.3661 has changed the count to
          be within 32-bit integer limit.
Solution: Remove the checks (zeertzjq).

closes: vim/vim#15239

69a28f6c08
This commit is contained in:
zeertzjq
2024-07-14 05:54:31 +08:00
parent eab535e10e
commit c31f64dd4d
2 changed files with 0 additions and 53 deletions

View File

@@ -1,52 +1,11 @@
local t = require('test.testutil')
local n = require('test.functional.testnvim')()
local Screen = require('test.functional.ui.screen')
local clear = n.clear
local exec_lua = n.exec_lua
local api = n.api
local source = n.source
local eq = t.eq
local function sizeoflong()
if not exec_lua('return pcall(require, "ffi")') then
pending('missing LuaJIT FFI')
end
return exec_lua('return require("ffi").sizeof(require("ffi").typeof("long"))')
end
describe('put', function()
before_each(clear)
after_each(function()
eq({}, api.nvim_get_vvar('errors'))
end)
it('very large count 64-bit', function()
if sizeoflong() < 8 then
pending('Skipped: only works with 64 bit long ints')
end
source [[
new
let @" = repeat('x', 100)
call assert_fails('norm 999999999p', 'E1240:')
bwipe!
]]
end)
it('very large count (visual block) 64-bit', function()
if sizeoflong() < 8 then
pending('Skipped: only works with 64 bit long ints')
end
source [[
new
call setline(1, repeat('x', 100))
exe "norm \<C-V>$y"
call assert_fails('norm 999999999p', 'E1240:')
bwipe!
]]
end)
-- oldtest: Test_put_other_window()
it('above topline in buffer in two splits', function()

View File

@@ -168,12 +168,6 @@ func Test_very_large_count()
endfunc
func Test_very_large_count_64bit()
throw 'Skipped: v:sizeoflong is N/A' " use legacy/put_spec.lua instead
if v:sizeoflong < 8
throw 'Skipped: only works with 64 bit long ints'
endif
new
let @" = repeat('x', 100)
call assert_fails('norm 999999999p', 'E1240:')
@@ -190,12 +184,6 @@ func Test_very_large_count_block()
endfunc
func Test_very_large_count_block_64bit()
throw 'Skipped: v:sizeoflong is N/A' " use legacy/put_spec.lua instead
if v:sizeoflong < 8
throw 'Skipped: only works with 64 bit long ints'
endif
new
call setline(1, repeat('x', 100))
exe "norm \<C-V>$y"