8265918: java/io/Console/CharsetTest.java failed with "expect: spawn id exp6 not open"
Reviewed-by: alanb, iris
This commit is contained in:
parent
84b52db931
commit
294347b59b
test/jdk/java/io/Console
@ -30,7 +30,7 @@ import jdk.test.lib.process.ProcessTools;
|
||||
|
||||
/**
|
||||
* @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")
|
||||
@ -38,7 +38,6 @@ import jdk.test.lib.process.ProcessTools;
|
||||
* @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
|
||||
|
Loading…
x
Reference in New Issue
Block a user