55{fileparts(mfilename(' fullpath' )) + " /../Readme.md" , false }, ...
66{" not-exist" , false }, ...
77{' ' , false }, ...
8- {" " , false }
8+ {" " , false }, ...
9+ {' .' , false }, ...
10+ {matlab_path(), true }
911}
1012method = {' java' , ' python' , ' native' , ' legacy' }
1113end
@@ -20,25 +22,11 @@ function pkg_path(tc)
2022methods (Test , TestTags = " impure" )
2123
2224function test_is_exe(tc , p , method )
23- is_capable(tc , str2func(" stdlib." + method + " .is_exe" ))
24-
25- tc .verifyEqual(stdlib .is_exe(p{1 }, method ), p{2 })
26- end
27-
28-
29- function test_is_exe_dir(tc , method )
30- is_capable(tc , str2func(" stdlib." + method + " .is_exe" ))
31-
32- tc .verifyFalse(stdlib .is_exe(' .' , method ))
25+ try
26+ tc .verifyEqual(stdlib .is_exe(p{1 }, method ), p{2 })
27+ catch e
28+ tc .verifyEqual(e .identifier , ' stdlib:choose_method:NameError' , e .message )
3329end
34-
35-
36- function test_matlab_exe(tc , method )
37- is_capable(tc , str2func(" stdlib." + method + " .is_exe" ))
38-
39-
40- f = matlab_path();
41- tc .verifyTrue(stdlib .is_exe(f , method ))
4230end
4331
4432
0 commit comments