@@ -185,6 +185,18 @@ def Test_count()
185185 count (' ABC ABC ABC' , ' b' , false)- >assert_equal (0 )
186186enddef
187187
188+ def Test_executable ()
189+ CheckDefExecFailure ([' echo executable(true)' ], ' E928:' )
190+ CheckDefExecFailure ([' echo executable(v:null)' ], ' E928:' )
191+ CheckDefExecFailure ([' echo executable("")' ], ' E928:' )
192+ enddef
193+
194+ def Test_exepath ()
195+ CheckDefExecFailure ([' echo exepath(true)' ], ' E928:' )
196+ CheckDefExecFailure ([' echo exepath(v:null)' ], ' E928:' )
197+ CheckDefExecFailure ([' echo exepath("")' ], ' E928:' )
198+ enddef
199+
188200def Test_expand ()
189201 split SomeFile
190202 expand (' %' , true, true)- >assert_equal ([' SomeFile' ])
@@ -241,6 +253,39 @@ def Test_map_function_arg()
241253 CheckDefAndScriptSuccess (lines )
242254enddef
243255
256+ def Test_filereadable ()
257+ CheckDefExecFailure ([' echo filereadable(true)' ], ' E928:' )
258+ CheckDefExecFailure ([' echo filereadable(v:null)' ], ' E928:' )
259+ CheckDefExecFailure ([' echo filereadable("")' ], ' E928:' )
260+ enddef
261+
262+ def Test_filewritable ()
263+ CheckDefExecFailure ([' echo filewritable(true)' ], ' E928:' )
264+ CheckDefExecFailure ([' echo filewritable(v:null)' ], ' E928:' )
265+ CheckDefExecFailure ([' echo filewritable("")' ], ' E928:' )
266+ enddef
267+
268+ def Test_finddir ()
269+ CheckDefExecFailure ([' echo finddir(true)' ], ' E928:' )
270+ CheckDefExecFailure ([' echo finddir(v:null)' ], ' E928:' )
271+ CheckDefExecFailure ([' echo finddir("")' ], ' E928:' )
272+ enddef
273+
274+ def Test_findfile ()
275+ CheckDefExecFailure ([' echo findfile(true)' ], ' E928:' )
276+ CheckDefExecFailure ([' echo findfile(v:null)' ], ' E928:' )
277+ CheckDefExecFailure ([' echo findfile("")' ], ' E928:' )
278+ enddef
279+
280+ def Test_fnamemodify ()
281+ CheckDefExecFailure ([' echo fnamemodify(true, ":p")' ], ' E928:' )
282+ CheckDefExecFailure ([' echo fnamemodify(v:null, ":p")' ], ' E928:' )
283+ CheckDefExecFailure ([' echo fnamemodify("", ":p")' ], ' E928:' )
284+ CheckDefExecFailure ([' echo fnamemodify("file", true)' ], ' E928:' )
285+ CheckDefExecFailure ([' echo fnamemodify("file", v:null)' ], ' E928:' )
286+ CheckDefExecFailure ([' echo fnamemodify("file", "")' ], ' E928:' )
287+ enddef
288+
244289def Test_filter_wrong_dict_key_type ()
245290 assert_fails (' Wrong_dict_key_type([1, 2, 3])' , ' E1012:' )
246291enddef
@@ -313,6 +358,30 @@ def Test_getloclist_return_type()
313358 d - >assert_equal ({items : []})
314359enddef
315360
361+ def Test_getfperm ()
362+ CheckDefExecFailure ([' echo getfperm(true)' ], ' E928:' )
363+ CheckDefExecFailure ([' echo getfperm(v:null)' ], ' E928:' )
364+ CheckDefExecFailure ([' echo getfperm("")' ], ' E928:' )
365+ enddef
366+
367+ def Test_getfsize ()
368+ CheckDefExecFailure ([' echo getfsize(true)' ], ' E928:' )
369+ CheckDefExecFailure ([' echo getfsize(v:null)' ], ' E928:' )
370+ CheckDefExecFailure ([' echo getfsize("")' ], ' E928:' )
371+ enddef
372+
373+ def Test_getftime ()
374+ CheckDefExecFailure ([' echo getftime(true)' ], ' E928:' )
375+ CheckDefExecFailure ([' echo getftime(v:null)' ], ' E928:' )
376+ CheckDefExecFailure ([' echo getftime("")' ], ' E928:' )
377+ enddef
378+
379+ def Test_getftype ()
380+ CheckDefExecFailure ([' echo getftype(true)' ], ' E928:' )
381+ CheckDefExecFailure ([' echo getftype(v:null)' ], ' E928:' )
382+ CheckDefExecFailure ([' echo getftype("")' ], ' E928:' )
383+ enddef
384+
316385def Test_getqflist_return_type ()
317386 var l = getqflist ()
318387 l - >assert_equal ([])
0 commit comments