8272358: Some tests may fail when executed with other locales than the US

Reviewed-by: aivanov
This commit is contained in:
Sergey Bylokhov 2021-11-17 22:21:38 +00:00
parent ce4471f806
commit 29e552c03a
4 changed files with 9 additions and 8 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -553,7 +553,7 @@ public class ToolBasicTest extends ReplToolTesting {
}
public void testOpenResource() {
test(
test(new String[]{"-R", "-Duser.language=en", "-R", "-Duser.country=US"},
(a) -> assertCommand(a, "/open PRINTING", ""),
(a) -> assertCommandOutputContains(a, "/list",
"void println", "System.out.printf"),

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -744,7 +744,8 @@ public class ToolSimpleTest extends ReplToolTesting {
@Test
public void testCompoundStart() {
test(new String[]{"--startup", "DEFAULT", "--startup", "PRINTING"},
test(new String[]{"-R", "-Duser.language=en", "-R", "-Duser.country=US",
"--startup", "DEFAULT", "--startup", "PRINTING"},
(a) -> assertCommand(a, "printf(\"%4.2f\", Math.PI)",
"", "", null, "3.14", "")
);

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test
* @bug 8003639
* @summary convert lambda testng tests to jtreg and add them
* @run testng LambdaTranslationTest1
* @run testng/othervm -Duser.language=en -Duser.country=US LambdaTranslationTest1
*/
import org.testng.annotations.Test;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,7 +25,7 @@
* @test
* @bug 8003639
* @summary convert lambda testng tests to jtreg and add them
* @run testng LambdaTranslationTest2
* @run testng/othervm -Duser.language=en -Duser.country=US LambdaTranslationTest2
*/
import org.testng.annotations.Test;