File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
test/jdk/java/io/pathNames/win32 Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2626 @summary Check that pathnames containing double-byte characters are not
2727 corrupted by win32 path processing
2828 @author Mark Reinhold
29+ @library /test/lib
2930*/
3031
31- import java .io .*;
32+ import java .io .File ;
33+ import java .io .FileOutputStream ;
34+ import java .io .IOException ;
35+ import java .io .OutputStream ;
36+
37+ import jtreg .SkippedException ;
3238
3339
3440public class SJIS {
@@ -47,8 +53,11 @@ public static void main(String[] args) throws Exception {
4753 /* This test is only valid on win32 systems
4854 that use the SJIS encoding */
4955 if (File .separatorChar != '\\' ) return ;
50- String enc = System .getProperty ("file.encoding" );
51- if ((enc == null ) || !enc .equals ("SJIS" )) return ;
56+ String enc = System .getProperty ("native.encoding" );
57+ if ((enc == null ) || !enc .equals ("MS932" )) {
58+ throw new SkippedException (
59+ "native.encoding(%s) is not MS932" .formatted (enc ));
60+ }
5261
5362 File f = new File ("\u30BD " );
5463 if (f .exists ()) rm (f );
You can’t perform that action at this time.
0 commit comments