8320348: test/jdk/java/io/File/GetAbsolutePath.windowsDriveRelative fails if working directory is not on drive C

Reviewed-by: alanb, mbaesken
This commit is contained in:
Brian Burkhalter 2023-11-20 18:23:02 +00:00
parent a2c0fa6f9c
commit 32098ce33c

View File

@ -88,7 +88,10 @@ public class GetAbsolutePath {
File f = new File(z + ":.");
if (f.exists()) {
String zUSER_DIR = f.getCanonicalPath();
assertEquals(z + ":foo", zUSER_DIR + "\\foo");
File path = new File(z + ":foo");
String p = path.getAbsolutePath();
String ans = zUSER_DIR + "\\foo";
assertEquals(0, p.compareToIgnoreCase(ans));
}
}
}