Skip to content

Commit dfc9c83

Browse files
committed
fully resolve symlink path in test
1 parent 9d048f2 commit dfc9c83

File tree

1 file changed

+3
-2
lines changed
  • graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/module

1 file changed

+3
-2
lines changed

graalpython/com.oracle.graal.python.test/src/com/oracle/graal/python/test/module/PosixTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,11 @@ public void printToFile() throws IOException {
183183

184184
@Test
185185
public void readlink() throws IOException {
186-
Path symlinkPath = tmpfile.getParent().resolve(tmpfile.getFileName() + "__symlink");
186+
Path realPath = tmpfile.toRealPath();
187+
Path symlinkPath = realPath.getParent().resolve(tmpfile.getFileName() + "__symlink");
187188
try {
188189
Path symlink = Files.createSymbolicLink(symlinkPath, Paths.get(tmpfile.toUri()));
189-
assertPrints(tmpfile.toString() + "\n", "import posix\n" +
190+
assertPrints(realPath.toString() + "\n", "import posix\n" +
190191
"print(posix.readlink('" + symlink.toString() + "'))\n");
191192
} finally {
192193
Files.deleteIfExists(symlinkPath);

0 commit comments

Comments
 (0)