From 32098ce33cfd38e115c1e13d11c72815f7c2d4cd Mon Sep 17 00:00:00 2001 From: Brian Burkhalter Date: Mon, 20 Nov 2023 18:23:02 +0000 Subject: [PATCH] 8320348: test/jdk/java/io/File/GetAbsolutePath.windowsDriveRelative fails if working directory is not on drive C Reviewed-by: alanb, mbaesken --- test/jdk/java/io/File/GetAbsolutePath.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/jdk/java/io/File/GetAbsolutePath.java b/test/jdk/java/io/File/GetAbsolutePath.java index 09356f64840..ad2e1cc79f1 100644 --- a/test/jdk/java/io/File/GetAbsolutePath.java +++ b/test/jdk/java/io/File/GetAbsolutePath.java @@ -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)); } } }