8355558: SJIS.java test is always ignored
Reviewed-by: bpb
This commit is contained in:
parent
b1e778d9d2
commit
c0dc31422d
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 1998, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 1998, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -26,9 +26,15 @@
|
|||||||
@summary Check that pathnames containing double-byte characters are not
|
@summary Check that pathnames containing double-byte characters are not
|
||||||
corrupted by win32 path processing
|
corrupted by win32 path processing
|
||||||
@author Mark Reinhold
|
@author Mark Reinhold
|
||||||
|
@library /test/lib
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.File;
|
||||||
|
import java.io.FileOutputStream;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.OutputStream;
|
||||||
|
|
||||||
|
import jtreg.SkippedException;
|
||||||
|
|
||||||
|
|
||||||
public class SJIS {
|
public class SJIS {
|
||||||
@ -47,8 +53,11 @@ public class SJIS {
|
|||||||
/* This test is only valid on win32 systems
|
/* This test is only valid on win32 systems
|
||||||
that use the SJIS encoding */
|
that use the SJIS encoding */
|
||||||
if (File.separatorChar != '\\') return;
|
if (File.separatorChar != '\\') return;
|
||||||
String enc = System.getProperty("file.encoding");
|
String enc = System.getProperty("native.encoding");
|
||||||
if ((enc == null) || !enc.equals("SJIS")) return;
|
if ((enc == null) || !enc.equals("MS932")) {
|
||||||
|
throw new SkippedException(
|
||||||
|
"native.encoding(%s) is not MS932".formatted(enc));
|
||||||
|
}
|
||||||
|
|
||||||
File f = new File("\u30BD");
|
File f = new File("\u30BD");
|
||||||
if (f.exists()) rm(f);
|
if (f.exists()) rm(f);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user