mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 11:04:34 +02:00
8153482: jdk/jshell/StartOptionTest.java fails on Windows after JDK-8147515
Reviewed-by: jlahoda
This commit is contained in:
parent
9351c0eddf
commit
02b6426e3a
1 changed files with 8 additions and 8 deletions
|
@ -88,7 +88,7 @@ public class StartOptionTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void start(String expectedOutput, String expectedError, String... args) throws Exception {
|
private void start(String expectedOutput, String expectedError, String... args) throws Exception {
|
||||||
start(s -> assertEquals(s, expectedOutput, "Output: "), s -> assertEquals(s, expectedError, "Error: "), args);
|
start(s -> assertEquals(s.trim(), expectedOutput, "Output: "), s -> assertEquals(s.trim(), expectedError, "Error: "), args);
|
||||||
}
|
}
|
||||||
|
|
||||||
@BeforeMethod
|
@BeforeMethod
|
||||||
|
@ -110,7 +110,7 @@ public class StartOptionTest {
|
||||||
start(s -> {
|
start(s -> {
|
||||||
assertTrue(s.split("\n").length >= 7, s);
|
assertTrue(s.split("\n").length >= 7, s);
|
||||||
assertTrue(s.startsWith("Usage: jshell <options>"), s);
|
assertTrue(s.startsWith("Usage: jshell <options>"), s);
|
||||||
}, s -> assertEquals(s, "Unknown option: -unknown\n"), "-unknown");
|
}, s -> assertEquals(s.trim(), "Unknown option: -unknown"), "-unknown");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(enabled = false) // TODO 8080883
|
@Test(enabled = false) // TODO 8080883
|
||||||
|
@ -118,17 +118,17 @@ public class StartOptionTest {
|
||||||
Compiler compiler = new Compiler();
|
Compiler compiler = new Compiler();
|
||||||
Path p = compiler.getPath("file.txt");
|
Path p = compiler.getPath("file.txt");
|
||||||
compiler.writeToFile(p);
|
compiler.writeToFile(p);
|
||||||
start("", "'-startup' requires a filename argument.\n", "-startup");
|
start("", "'-startup' requires a filename argument.", "-startup");
|
||||||
start("", "Conflicting -startup or -nostartup option.\n", "-startup", p.toString(), "-startup", p.toString());
|
start("", "Conflicting -startup or -nostartup option.", "-startup", p.toString(), "-startup", p.toString());
|
||||||
start("", "Conflicting -startup or -nostartup option.\n", "-nostartup", "-startup", p.toString());
|
start("", "Conflicting -startup or -nostartup option.", "-nostartup", "-startup", p.toString());
|
||||||
start("", "Conflicting -startup or -nostartup option.\n", "-startup", p.toString(), "-nostartup");
|
start("", "Conflicting -startup or -nostartup option.", "-startup", p.toString(), "-nostartup");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testClasspath() throws Exception {
|
public void testClasspath() throws Exception {
|
||||||
for (String cp : new String[] {"-cp", "-classpath"}) {
|
for (String cp : new String[] {"-cp", "-classpath"}) {
|
||||||
start("", "Conflicting -classpath option.\n", cp, ".", "-classpath", ".");
|
start("", "Conflicting -classpath option.", cp, ".", "-classpath", ".");
|
||||||
start("", "Argument to -classpath missing.\n", cp);
|
start("", "Argument to -classpath missing.", cp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue