comparison src/testdir/test_vim9_func.vim @ 21089:d69ead03ba93 v8.2.1096

patch 8.2.1096: Vim9: return type of getqflist() is wrong Commit: https://github.com/vim/vim/commit/f151ad1c70825a91afb112e611db5c712e2656ef Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jun 30 13:38:01 2020 +0200 patch 8.2.1096: Vim9: return type of getqflist() is wrong Problem: Vim9: return type of getqflist() is wrong. Solution: Let the return type depend on the arguments. Also for getloclist(). (closes #6367)
author Bram Moolenaar <Bram@vim.org>
date Tue, 30 Jun 2020 13:45:06 +0200
parents d561e3c6cd65
children b0baa80cb53f
comparison
equal deleted inserted replaced
21088:949a9ea0cfce 21089:d69ead03ba93
835 def Test_sort_return_type() 835 def Test_sort_return_type()
836 let res: list<number> 836 let res: list<number>
837 res = [1, 2, 3]->sort() 837 res = [1, 2, 3]->sort()
838 enddef 838 enddef
839 839
840 def Test_getqflist_return_type()
841 let l = getqflist()
842 assert_equal([], l)
843
844 let d = getqflist(#{items: 0})
845 assert_equal(#{items: []}, d)
846 enddef
847
848 def Test_getloclist_return_type()
849 let l = getloclist(1)
850 assert_equal([], l)
851
852 let d = getloclist(1, #{items: 0})
853 assert_equal(#{items: []}, d)
854 enddef
855
840 def Line_continuation_in_def(dir: string = ''): string 856 def Line_continuation_in_def(dir: string = ''): string
841 let path: string = empty(dir) 857 let path: string = empty(dir)
842 \ ? 'empty' 858 \ ? 'empty'
843 \ : 'full' 859 \ : 'full'
844 return path 860 return path