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 1616
1717% https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/nio/file/Files.html#readSymbolicLink(java.nio.file.Path)
1818% 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() ));
2020
2121else
2222 [ok , t ] = isSymbolicLink(p );
Original file line number Diff line number Diff line change @@ -42,14 +42,21 @@ function test_is_symlink(tc)
4242
4343end
4444
45+
4546function test_read_symlink(tc )
47+ import matlab .unittest .constraints .IsOfClass
4648
4749tc .verifyEmpty(stdlib .read_symlink(" not-exist" ))
4850tc .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 ))
5056
5157end
5258
59+
5360function test_create_symlink(tc )
5461
5562tc .verifyFalse(stdlib .create_symlink(tc .TestData .this , tc .TestData .link ))
@@ -61,4 +68,4 @@ function test_create_symlink(tc)
6168
6269end
6370
64- end
71+ end
You can’t perform that action at this time.
0 commit comments