File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
test/jdk/java/lang/System Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2021, 2022, 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
2323
2424/*
2525 * @test
26- * @bug 8260265
26+ * @bug 8260265 8282042
2727 * @summary Test file.encoding system property
2828 * @library /test/lib
2929 * @build jdk.test.lib.process.*
4040import org .testng .annotations .Test ;
4141
4242public class FileEncodingTest {
43- private static final boolean IS_WINDOWS = System .getProperty ("os.name" ). startsWith ( "Windows " );
43+ private static final String OS_NAME = System .getProperty ("os.name" );
4444
4545 @ DataProvider
4646 public Object [][] fileEncodingToDefault () {
@@ -56,14 +56,16 @@ public Object[][] fileEncodingToDefault() {
5656 @ Test (dataProvider = "fileEncodingToDefault" )
5757 public void testFileEncodingToDefault (String fileEncoding , String expected ) throws Exception {
5858 if (fileEncoding .equals ("COMPAT" )) {
59- if (IS_WINDOWS ) {
59+ if (OS_NAME . startsWith ( "Windows" ) ) {
6060 // Only tests on English locales
6161 if (Locale .getDefault ().getLanguage ().equals ("en" )) {
6262 expected = "windows-1252" ;
6363 } else {
6464 System .out .println ("Tests only run on Windows with English locales" );
6565 return ;
6666 }
67+ } else if (OS_NAME .startsWith ("AIX" )) {
68+ expected = "ISO-8859-1" ;
6769 } else {
6870 expected = "US-ASCII" ;
6971 }
You can’t perform that action at this time.
0 commit comments