diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2024-10-17 17:58:13 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2024-10-21 00:54:42 +0200 |
commit | 960fdc775a88389d8b19389b8c74c98921b9acac (patch) | |
tree | 8ab3f98ac1b2e7d1cfa84e451b241a256f0aea98 /test/functional/lua/vim_spec.lua | |
parent | c9c17fda80d843158d2785b047fca3a6dd78ea2f (diff) | |
download | rneovim-960fdc775a88389d8b19389b8c74c98921b9acac.tar.gz rneovim-960fdc775a88389d8b19389b8c74c98921b9acac.tar.bz2 rneovim-960fdc775a88389d8b19389b8c74c98921b9acac.zip |
fix(lua): vim.deprecate does not support major>0
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index 793cf7cfd7..ccb45a9d26 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -155,10 +155,10 @@ describe('lua stdlib', function() end) it('plugin=nil, no error if soft-deprecated', function() - eq( - vim.NIL, - exec_lua('return vim.deprecate(...)', 'foo.baz()', 'foo.better_baz()', '0.99.0') - ) + eq(vim.NIL, exec_lua [[return vim.deprecate('old1', 'new1', '0.99.0')]]) + -- Major version > current Nvim major is always "soft-deprecated". + -- XXX: This is also a reminder to update the hardcoded `nvim_major`, when Nvim reaches 1.0. + eq(vim.NIL, exec_lua [[return vim.deprecate('old2', 'new2', '1.0.0')]]) end) it('plugin=nil, show error if hard-deprecated', function() @@ -175,13 +175,6 @@ describe('lua stdlib', function() ) end) - it('plugin=nil, to be deleted in the next major version (1.0)', function() - eq( - [[foo.baz() is deprecated. Run ":checkhealth vim.deprecated" for more information]], - exec_lua [[ return vim.deprecate('foo.baz()', nil, '1.0') ]] - ) - end) - it('plugin specified', function() -- When `plugin` is specified, don't show ":help deprecated". #22235 eq( |