Skip to content

Commit 5b202a0

Browse files
committed
test:is_exe: newer
1 parent d77dccb commit 5b202a0

File tree

2 files changed

+7
-23
lines changed

2 files changed

+7
-23
lines changed

test/TestIsExe.m

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
{fileparts(mfilename('fullpath')) + "/../Readme.md", false}, ...
66
{"not-exist", false}, ...
77
{'', false}, ...
8-
{"", false}
8+
{"", false}, ...
9+
{'.', false}, ...
10+
{matlab_path(), true}
911
}
1012
method = {'java', 'python', 'native', 'legacy'}
1113
end
@@ -20,25 +22,11 @@ function pkg_path(tc)
2022
methods(Test, TestTags="impure")
2123

2224
function 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)
3329
end
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))
4230
end
4331

4432

test/is_capable.m

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,6 @@ function is_capable(tc, f)
5353

5454
elseif contains(n, ".native.")
5555

56-
if endsWith(n, "is_exe")
57-
tc.assumeFalse(isMATLABReleaseOlderThan('R2025a'))
58-
end
59-
6056
if endsWith(n, "canonical")
6157
tc.assumeFalse(isMATLABReleaseOlderThan('R2024a'))
6258
end

0 commit comments

Comments
 (0)