Skip to content

Commit d47528a

Browse files
committed
test tag
1 parent 54ba887 commit d47528a

File tree

12 files changed

+31
-22
lines changed

12 files changed

+31
-22
lines changed

+stdlib/+legacy/set_permissions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
[s, msg, id] = fileattrib(char(file), mode);
3131
ok = s == 1;
3232
if ~ok
33-
warning(id, "Failed to set permissions %s for %s: %s", mode, file, msg)
33+
warning(id, 'Failed to set permissions %s for %s: %s', mode, file, msg)
3434
end
3535

3636
end

+stdlib/set_permissions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
b = 'native';
1919
catch e
2020
switch e.identifier
21-
case 'MATLAB:UndefinedFunction'
21+
case {'MATLAB:UndefinedFunction', 'MATLAB:m_illegal_character'}
2222
ok = stdlib.legacy.set_permissions(file, readable, writable, executable);
2323
b = 'legacy';
2424
case 'MATLAB:io:filesystem:filePermissions:CannotFindLocation'

test/TestExists.m

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,37 @@ function test_dirs(tc)
1414
end
1515

1616

17-
methods (Test, TestTags={'R2017a'})
17+
methods (Test, TestTags={'R2016a'})
1818

1919
function test_exists(tc, Ps)
2020
r = stdlib.exists(Ps{1});
2121
tc.verifyEqual(r, Ps{2}, Ps{1})
2222

23-
r = stdlib.exists(string(Ps{1}));
24-
tc.verifyEqual(r, Ps{2})
23+
if ~stdlib.matlabOlderThan('R2016b')
24+
r = stdlib.exists(string(Ps{1}));
25+
tc.verifyEqual(r, Ps{2})
26+
end
2527
end
2628

2729

2830
function test_is_readable(tc, Ps)
2931
r = stdlib.is_readable(Ps{1});
3032
tc.verifyEqual(r, Ps{2})
3133

32-
r = stdlib.is_readable(string(Ps{1}));
33-
tc.verifyEqual(r, Ps{2});
34+
if ~stdlib.matlabOlderThan('R2016b')
35+
r = stdlib.is_readable(string(Ps{1}));
36+
tc.verifyEqual(r, Ps{2});
37+
end
3438
end
3539

3640
function test_is_writable(tc, Ps)
3741
r = stdlib.is_writable(Ps{1});
3842
tc.verifyEqual(r, Ps{2})
3943

40-
r = stdlib.is_writable(string(Ps{1}));
41-
tc.verifyEqual(r, Ps{2});
44+
if ~stdlib.matlabOlderThan('R2016b')
45+
r = stdlib.is_writable(string(Ps{1}));
46+
tc.verifyEqual(r, Ps{2});
47+
end
4248
end
4349
end
4450

@@ -55,7 +61,9 @@ function test_is_char_device(tc, B_is_char_device)
5561
if ismember(B_is_char_device, stdlib.Backend().select('is_char_device'))
5662
tc.verifyTrue(r, n)
5763

58-
tc.verifyTrue(stdlib.is_char_device(string(n), B_is_char_device))
64+
if ~stdlib.matlabOlderThan('R2016b')
65+
tc.verifyTrue(stdlib.is_char_device(string(n), B_is_char_device))
66+
end
5967
else
6068
tc.verifyEmpty(r)
6169
end

test/TestExpanduser.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'impure'}) ...
2+
TestTags = {'R2016a', 'impure'}) ...
33
TestExpanduser < matlab.unittest.TestCase
44

55
properties (TestParameter)
@@ -12,9 +12,9 @@
1212
function test_expanduser(tc, p)
1313
tc.verifyEqual(stdlib.expanduser(p{1}), p{2})
1414

15-
ins = string(p{1});
16-
ref = string(p{2});
17-
tc.verifyEqual(stdlib.expanduser(ins), ref);
15+
if ~stdlib.matlabOlderThan('R2016b')
16+
tc.verifyEqual(stdlib.expanduser(string(p{1})), string(p{2}))
17+
end
1818
end
1919

2020
end

test/TestFileImpure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'impure'}) ...
2+
TestTags = {'R2016a', 'impure'}) ...
33
TestFileImpure < matlab.unittest.TestCase
44

55
properties (TestParameter)

test/TestFilePure.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'pure'}) ...
2+
TestTags = {'R2016a', 'pure'}) ...
33
TestFilePure < matlab.unittest.TestCase
44

55

test/TestIsAbsolute.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'pure'}) ...
2+
TestTags = {'R2016a', 'pure'}) ...
33
TestIsAbsolute < matlab.unittest.TestCase
44

55
properties (TestParameter)

test/TestIsExe.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'pure'}) ...
2+
TestTags = {'R2016a', 'pure'}) ...
33
TestIsExe < matlab.unittest.TestCase
44

55
properties (TestParameter)

test/TestPermissions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function w_dirs(tc)
1818
end
1919

2020

21-
methods (Test, TestTags={'R2017a'})
21+
methods (Test, TestTags={'R2016a'})
2222

2323
function test_get_permissions(tc, Ps)
2424
import matlab.unittest.constraints.StartsWithSubstring

test/TestStem.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ...
2-
TestTags = {'R2017a', 'pure'}) ...
2+
TestTags = {'R2016a', 'pure'}) ...
33
TestStem < matlab.unittest.TestCase
44

55
properties (TestParameter)

0 commit comments

Comments
 (0)