@@ -1027,6 +1027,14 @@ def Test_filewritable()
10271027enddef
10281028
10291029def Test_finddir ()
1030+ mkdir (' Xtestdir' )
1031+ finddir (' Xtestdir' , ' **' , -1 )- >assert_equal ([' Xtestdir' ])
1032+ var lines = << trim END
1033+ var l: list <string> = finddir (' nothing' , ' *;' , -1 )
1034+ END
1035+ CheckDefAndScriptSuccess (lines )
1036+ delete (' Xtestdir' , ' rf' )
1037+
10301038 CheckDefAndScriptFailure2 ([' finddir(true)' ], ' E1013: Argument 1: type mismatch, expected string but got bool' , ' E1174: String required for argument 1' )
10311039 CheckDefAndScriptFailure2 ([' finddir(v:null)' ], ' E1013: Argument 1: type mismatch, expected string but got special' , ' E1174: String required for argument 1' )
10321040 CheckDefExecFailure ([' echo finddir("")' ], ' E1175:' )
@@ -1035,6 +1043,12 @@ def Test_finddir()
10351043enddef
10361044
10371045def Test_findfile ()
1046+ findfile (' runtest.vim' , ' **' , -1 )- >assert_equal ([' runtest.vim' ])
1047+ var lines = << trim END
1048+ var l: list <string> = findfile (' nothing' , ' *;' , -1 )
1049+ END
1050+ CheckDefAndScriptSuccess (lines )
1051+
10381052 CheckDefExecFailure ([' findfile(true)' ], ' E1013: Argument 1: type mismatch, expected string but got bool' )
10391053 CheckDefExecFailure ([' findfile(v:null)' ], ' E1013: Argument 1: type mismatch, expected string but got special' )
10401054 CheckDefExecFailure ([' findfile("")' ], ' E1175:' )
0 commit comments