Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 294347b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 1 addition & 2 deletions test/jdk/java/io/Console/CharsetTest.java
Expand Up @@ -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 {
Expand Down
12 changes: 1 addition & 11 deletions test/jdk/java/io/Console/script.exp
Expand Up @@ -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

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.