aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-01-01 17:40:26 -0500
committerGitHub <noreply@github.com>2021-01-01 17:40:26 -0500
commit5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc (patch)
treebee93b8000a81cc57203a8f408425a656c05e410 /test
parent7718826edf0a4af175d230a691d9d9559f9d8acc (diff)
parent52bfaea70e901f2e1db9f9db173a50ef3da898c9 (diff)
downloadrneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.tar.gz
rneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.tar.bz2
rneovim-5eccfd2b2e5366f2bbe6aca1471a5d52e77c9fbc.zip
Merge pull request #13655 from janlazo/vim-8.2.2255
vim-patch:8.1.{1241,1261,1275,1281,1549,1590,1881,2079,2322,2360,2411},8.2.{113,388,934,2255,2258,2260,2269}
Diffstat (limited to 'test')
-rw-r--r--test/functional/legacy/assert_spec.lua12
-rw-r--r--test/functional/legacy/memory_usage_spec.lua46
-rw-r--r--test/functional/provider/define_spec.lua8
3 files changed, 33 insertions, 33 deletions
diff --git a/test/functional/legacy/assert_spec.lua b/test/functional/legacy/assert_spec.lua
index d48b8882af..515d6d91b8 100644
--- a/test/functional/legacy/assert_spec.lua
+++ b/test/functional/legacy/assert_spec.lua
@@ -242,9 +242,9 @@ describe('assert function:', function()
-- assert_fails({cmd}, [, {error}])
describe('assert_fails', function()
it('should change v:errors when error does not match v:errmsg', function()
- eq(1, eval([[assert_fails('xxx', {})]]))
- command([[call assert_match("Expected {} but got 'E731:", v:errors[0])]])
- expected_errors({"Expected {} but got 'E731: using Dictionary as a String'"})
+ eq(1, eval([[assert_fails('xxx', 'E12345')]]))
+ command([[call assert_match("Expected 'E12345' but got 'E492:", v:errors[0])]])
+ expected_errors({"Expected 'E12345' but got 'E492: Not an editor command: xxx': xxx"})
end)
it('should not change v:errors when cmd errors', function()
@@ -258,9 +258,9 @@ describe('assert function:', function()
end)
it('can specify and get a message about what failed', function()
- eq(1, eval([[assert_fails('xxx', {}, 'stupid')]]))
- command([[call assert_match("stupid: Expected {} but got 'E731:", v:errors[0])]])
- expected_errors({"stupid: Expected {} but got 'E731: using Dictionary as a String'"})
+ eq(1, eval([[assert_fails('xxx', 'E9876', 'stupid')]]))
+ command([[call assert_match("stupid: Expected 'E9876' but got 'E492:", v:errors[0])]])
+ expected_errors({"stupid: Expected 'E9876' but got 'E492: Not an editor command: xxx': stupid"})
end)
it('can specify and get a message even when cmd succeeds', function()
diff --git a/test/functional/legacy/memory_usage_spec.lua b/test/functional/legacy/memory_usage_spec.lua
index fb0bacc2d2..5f7bbd887f 100644
--- a/test/functional/legacy/memory_usage_spec.lua
+++ b/test/functional/legacy/memory_usage_spec.lua
@@ -10,6 +10,29 @@ local source = helpers.source
local poke_eventloop = helpers.poke_eventloop
local uname = helpers.uname
local load_adjust = helpers.load_adjust
+local isCI = helpers.isCI
+
+local function isasan()
+ local version = eval('execute("version")')
+ return version:match('-fsanitize=[a-z,]*address')
+end
+
+clear()
+if isasan() then
+ pending('ASAN build is difficult to estimate memory usage', function() end)
+ return
+elseif iswin() then
+ if isCI('github') then
+ pending('Windows runners in Github Actions do not have a stable environment to estimate memory usage', function() end)
+ return
+ elseif eval("executable('wmic')") == 0 then
+ pending('missing "wmic" command', function() end)
+ return
+ end
+elseif eval("executable('ps')") == 0 then
+ pending('missing "ps" command', function() end)
+ return
+end
local monitor_memory_usage = {
memory_usage = function(self)
@@ -71,11 +94,6 @@ describe('memory usage', function()
end
end
- local function isasan()
- local version = eval('execute("version")')
- return version:match('-fsanitize=[a-z,]*address')
- end
-
before_each(clear)
--[[
@@ -83,15 +101,6 @@ describe('memory usage', function()
just after it finishes.
]]--
it('function capture vargs', function()
- if isasan() then
- pending('ASAN build is difficult to estimate memory usage')
- end
- if iswin() and eval("executable('wmic')") == 0 then
- pending('missing "wmic" command')
- elseif eval("executable('ps')") == 0 then
- pending('missing "ps" command')
- end
-
local pid = eval('getpid()')
local before = monitor_memory_usage(pid)
source([[
@@ -125,15 +134,6 @@ describe('memory usage', function()
increase so much even when rerun Xtest.vim since system memory caches.
]]--
it('function capture lvars', function()
- if isasan() then
- pending('ASAN build is difficult to estimate memory usage')
- end
- if iswin() and eval("executable('wmic')") == 0 then
- pending('missing "wmic" command')
- elseif eval("executable('ps')") == 0 then
- pending('missing "ps" command')
- end
-
local pid = eval('getpid()')
local before = monitor_memory_usage(pid)
local fname = source([[
diff --git a/test/functional/provider/define_spec.lua b/test/functional/provider/define_spec.lua
index 1d50ce0a56..12efbec326 100644
--- a/test/functional/provider/define_spec.lua
+++ b/test/functional/provider/define_spec.lua
@@ -136,7 +136,7 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
end)
it('with nargs/count', function()
- call(fn, args..', {"nargs": "1", "range": "5"}')
+ call(fn, args..', {"nargs": "1", "count": "5"}')
local function on_setup()
command('5RpcCommand arg')
end
@@ -152,7 +152,7 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
end)
it('with nargs/count/bang', function()
- call(fn, args..', {"nargs": "1", "range": "5", "bang": ""}')
+ call(fn, args..', {"nargs": "1", "count": "5", "bang": ""}')
local function on_setup()
command('5RpcCommand! arg')
end
@@ -169,7 +169,7 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
end)
it('with nargs/count/bang/register', function()
- call(fn, args..', {"nargs": "1", "range": "5", "bang": "",'..
+ call(fn, args..', {"nargs": "1", "count": "5", "bang": "",'..
' "register": ""}')
local function on_setup()
command('5RpcCommand! b arg')
@@ -188,7 +188,7 @@ local function command_specs_for(fn, sync, first_arg_factory, init)
end)
it('with nargs/count/bang/register/eval', function()
- call(fn, args..', {"nargs": "1", "range": "5", "bang": "",'..
+ call(fn, args..', {"nargs": "1", "count": "5", "bang": "",'..
' "register": "", "eval": "@<reg>"}')
local function on_setup()
command('let @b = "regb"')