diff options
author | NAKAI Tsuyoshi <82267684+uga-rosa@users.noreply.github.com> | 2022-10-24 21:53:53 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-24 05:53:53 -0700 |
commit | 4573cfa3adac3a7dbf1b6b032471a1c14adc7427 (patch) | |
tree | d898200b26b654a1fe19b3f09541b9d4a1217283 /test/functional/lua/vim_spec.lua | |
parent | 1248c12666dc4d8fb801c2a8dbc355027f8f9bbe (diff) | |
download | rneovim-4573cfa3adac3a7dbf1b6b032471a1c14adc7427.tar.gz rneovim-4573cfa3adac3a7dbf1b6b032471a1c14adc7427.tar.bz2 rneovim-4573cfa3adac3a7dbf1b6b032471a1c14adc7427.zip |
fix(lua): pesc, tbl_islist result types #20751
Problem:
- pesc() returns multiple results, it should return a single result.
- tbl_islist() returns non-boolean in some branches.
- Docstring: @generic must be declared first
Solution:
Constrain docstring annotations.
Fix return types.
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Diffstat (limited to 'test/functional/lua/vim_spec.lua')
-rw-r--r-- | test/functional/lua/vim_spec.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/functional/lua/vim_spec.lua b/test/functional/lua/vim_spec.lua index ecfb7275cd..38f772c5cf 100644 --- a/test/functional/lua/vim_spec.lua +++ b/test/functional/lua/vim_spec.lua @@ -430,6 +430,8 @@ describe('lua stdlib', function() it('vim.pesc', function() eq('foo%-bar', exec_lua([[return vim.pesc('foo-bar')]])) eq('foo%%%-bar', exec_lua([[return vim.pesc(vim.pesc('foo-bar'))]])) + -- pesc() returns one result. #20751 + eq({'x'}, exec_lua([[return {vim.pesc('x')}]])) -- Validates args. matches('s: expected string, got number', |