|
1 | 1 | classdef (SharedTestFixtures={ matlab.unittest.fixtures.PathFixture(fileparts(fileparts(mfilename('fullpath'))))}, ... |
2 | | - TestTags = {'R2019b', 'symlink', 'impure'}) ... |
| 2 | + TestTags = {'R2017b', 'symlink'}) ... |
3 | 3 | TestSymlink < matlab.unittest.TestCase |
4 | 4 |
|
5 | 5 | properties |
|
21 | 21 | % needs to be per-method because multiple functions are used to make the same files |
22 | 22 |
|
23 | 23 | function setup_symlink(tc) |
24 | | -tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture()) |
| 24 | +tc.applyFixture(matlab.unittest.fixtures.WorkingFolderFixture()); |
25 | 25 |
|
26 | | -tc.link = fullfile(pwd(), 'my.lnk'); |
| 26 | +tc.link = [pwd(), '/my.lnk']; |
27 | 27 |
|
28 | | -tc.target = stdlib.append(mfilename("fullpath"), '.m'); |
| 28 | +tc.target = [pwd(), '/my_target.txt']; |
| 29 | +tc.assertTrue(stdlib.touch(tc.target), "failed to create test target " + tc.target) |
29 | 30 |
|
30 | | -tc.assumeTrue(stdlib.create_symlink(tc.target, tc.link), ... |
| 31 | +tc.assertTrue(stdlib.create_symlink(tc.target, tc.link), ... |
31 | 32 | "failed to create test link " + tc.link) |
32 | 33 | end |
33 | 34 | end |
@@ -75,7 +76,7 @@ function test_create_symlink(tc, B_create_symlink) |
75 | 76 | tc.applyFixture(matlab.unittest.fixtures.SuppressedWarningsFixture(["MATLAB:io:filesystem:symlink:TargetNotFound","MATLAB:io:filesystem:symlink:FileExists"])) |
76 | 77 |
|
77 | 78 | ano = fullfile(pwd(), 'another.lnk'); |
78 | | -tc.assertThat(ano, ~matlab.unittest.constraints.IsFile) |
| 79 | +tc.assertFalse(isfile(ano)) |
79 | 80 | tc.assertFalse(stdlib.is_symlink(ano)) |
80 | 81 |
|
81 | 82 | r = stdlib.create_symlink(tc.target, ano, B_create_symlink); |
|
0 commit comments