Skip to content

Commit d163d12

Browse files
committed
test:get_permissions: add no-exe test
1 parent 047daac commit d163d12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/TestPermissions.m

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
classdef TestPermissions < matlab.unittest.TestCase
22

33
properties (TestParameter)
4-
Ps = {".", pwd(), "", tempname()}
4+
Ps = {".", pwd(), "", tempname(), mfilename('fullpath') + ".m"}
55
end
66

77

@@ -16,6 +16,9 @@ function test_get_permissions(tc, Ps)
1616

1717
if stdlib.exists(Ps)
1818
tc.verifyThat(p, StartsWithSubstring("r"))
19+
if isfile(p) && stdlib.suffix(p) == ".m"
20+
tc.verifyEqual(p(3), '-')
21+
end
1922
else
2023
tc.verifyEmpty(p)
2124
end

0 commit comments

Comments
 (0)