Skip to content
Permalink
Browse files
8265918: java/io/Console/CharsetTest.java failed with "expect: spawn …
…id exp6 not open"

Reviewed-by: alanb, iris
  • Loading branch information
naotoj committed Apr 29, 2021
1 parent 84b52db commit 294347b59be684ee398b442a1c64824eb03311dc
Showing 2 changed files with 2 additions and 13 deletions.
@@ -30,15 +30,14 @@

/**
* @test
* @bug 8264208
* @bug 8264208 8265918
* @summary Tests Console.charset() method. "expect" command in Windows/Cygwin
* does not work as expected. Ignoring tests on Windows.
* @requires (os.family == "linux") | (os.family == "mac")
* @library /test/lib
* @run main CharsetTest en_US.ISO8859-1 ISO-8859-1
* @run main CharsetTest en_US.US-ASCII US-ASCII
* @run main CharsetTest en_US.UTF-8 UTF-8
* @run main CharsetTest en_US.FOO ignored
*/
public class CharsetTest {
public static void main(String... args) throws Throwable {
@@ -28,15 +28,5 @@ set args [lrange $argv 3 end]
regexp {([a-zA-Z_]*).([a-zA-Z0-9\-]*)} $locale dummy lang_region encoding

eval spawn $java -Dsun.stdout.encoding=$encoding -classpath $args CharsetTest
if {$encoding == "FOO"} then \
{expect "UTF-8"} \
else \
{expect $expected}

eval spawn env LANG=$locale LC_ALL=$locale $java -classpath $args CharsetTest
if {$encoding == "FOO"} then \
{expect "US-ASCII"} \
else \
{expect $expected}

expect $expected
expect eof

1 comment on commit 294347b

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 294347b Apr 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.