File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#readSymbolicLink(java.nio.file.Path)
18
18
% must be absolute path
19
- r = java .nio .file .Files .readSymbolicLink(java .io .File(r ).toPath());
19
+ r = stdlib . fileio .posix( java .nio .file .Files .readSymbolicLink(java .io .File(r ).toPath() ));
20
20
21
21
else
22
22
[ok , t ] = isSymbolicLink(p );
Original file line number Diff line number Diff line change @@ -42,14 +42,21 @@ function test_is_symlink(tc)
42
42
43
43
end
44
44
45
+
45
46
function test_read_symlink(tc )
47
+ import matlab .unittest .constraints .IsOfClass
46
48
47
49
tc .verifyEmpty(stdlib .read_symlink(" not-exist" ))
48
50
tc .verifyEmpty(stdlib .read_symlink(tc .TestData .this ))
49
- tc .verifyNotEmpty(stdlib .read_symlink(tc .TestData .link ))
51
+
52
+ t = stdlib .read_symlink(tc .TestData .link );
53
+ tc .verifyNotEmpty(t )
54
+ tc .verifyThat(t , IsOfClass(' string' ))
55
+ tc .verifyTrue(stdlib .samepath(tc .TestData .this , t ))
50
56
51
57
end
52
58
59
+
53
60
function test_create_symlink(tc )
54
61
55
62
tc .verifyFalse(stdlib .create_symlink(tc .TestData .this , tc .TestData .link ))
@@ -61,4 +68,4 @@ function test_create_symlink(tc)
61
68
62
69
end
63
70
64
- end
71
+ end
You can’t perform that action at this time.
0 commit comments