commit 6276fce11e1d1d344f988ebfc8857df7d4f1a8bd
parent c31f64dd4d1aa0b89ed76c4e808d664b4f349f50
Author: zeertzjq <zeertzjq@outlook.com>
Date: Sat, 13 Jul 2024 09:58:54 +0800
test(old): enable Test_address_line_overflow()
Nvim doesn't use atol() in getdigits() and doesn't need to check for
size of long.
Diffstat:
2 files changed, 1 insertion(+), 34 deletions(-)
diff --git a/test/functional/legacy/excmd_spec.lua b/test/functional/legacy/excmd_spec.lua
@@ -5,45 +5,14 @@ local Screen = require('test.functional.ui.screen')
local clear = n.clear
local command = n.command
local exec = n.exec
-local exec_lua = n.exec_lua
local expect_exit = n.expect_exit
local feed = n.feed
local fn = n.fn
-local api = n.api
local read_file = t.read_file
-local source = n.source
local eq = t.eq
local write_file = t.write_file
local is_os = t.is_os
-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('Ex command', function()
- before_each(clear)
- after_each(function()
- eq({}, api.nvim_get_vvar('errors'))
- end)
-
- it('checks for address line overflow', function()
- if sizeoflong() < 8 then
- pending('Skipped: only works with 64 bit long ints')
- end
-
- source [[
- new
- call setline(1, 'text')
- call assert_fails('|.44444444444444444444444', 'E1247:')
- call assert_fails('|.9223372036854775806', 'E1247:')
- bwipe!
- ]]
- end)
-end)
-
describe(':confirm command dialog', function()
local screen
diff --git a/test/old/testdir/test_excmd.vim b/test/old/testdir/test_excmd.vim
@@ -718,9 +718,7 @@ func Test_not_break_expression_register()
endfunc
func Test_address_line_overflow()
- throw 'Skipped: v:sizeoflong is N/A' " use legacy/excmd_spec.lua instead
-
- if v:sizeoflong < 8
+ if !has('nvim') && v:sizeoflong < 8
throw 'Skipped: only works with 64 bit long ints'
endif
new