77{' ' , false }, ...
88{" " , false }
99}
10- fun = {@stdlib.is_exe, @stdlib. java.is_exe, @stdlib. python.is_exe, @stdlib. native.is_exe, @stdlib.native.is_exe_legacy }
10+ method = {' java' , ' python' , ' native' , ' legacy ' }
1111end
1212
1313methods (TestClassSetup )
@@ -19,26 +19,26 @@ function pkg_path(tc)
1919
2020methods (Test , TestTags = " impure" )
2121
22- function test_is_exe(tc , p , fun )
23- is_capable(tc , fun )
22+ function test_is_exe(tc , p , method )
23+ is_capable(tc , str2func( " stdlib. " + method + " .is_exe " ) )
2424
25- tc .verifyEqual(fun (p{1 }), p{2 })
25+ tc .verifyEqual(stdlib .is_exe (p{1 }, method ), p{2 })
2626end
2727
2828
29- function test_is_exe_dir(tc , fun )
30- is_capable(tc , fun )
29+ function test_is_exe_dir(tc , method )
30+ is_capable(tc , str2func( " stdlib. " + method + " .is_exe " ) )
3131
32- tc .verifyFalse(fun (' .' ))
32+ tc .verifyFalse(stdlib .is_exe (' .' , method ))
3333end
3434
3535
36- function test_matlab_exe(tc , fun )
37- is_capable(tc , fun )
36+ function test_matlab_exe(tc , method )
37+ is_capable(tc , str2func( " stdlib. " + method + " .is_exe " ) )
3838
3939
4040f = matlab_path();
41- tc .verifyTrue(fun( f ))
41+ tc .verifyTrue(stdlib .is_exe( f , method ))
4242end
4343
4444
0 commit comments