--- a/langtools/test/jdk/jshell/ToolFormatTest.java Mon May 23 15:07:10 2016 +0100
+++ b/langtools/test/jdk/jshell/ToolFormatTest.java Mon May 23 10:12:05 2016 -0700
@@ -43,7 +43,7 @@
public void testSetFormat() {
try {
test(
- (a) -> assertCommandOutputStartsWith(a, "/set newmode test -command", "| Created new feedback mode: test"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode test -command", "| Created new feedback mode: test"),
(a) -> assertCommand(a, "/set format test pre '$ '", ""),
(a) -> assertCommand(a, "/set format test post ''", ""),
(a) -> assertCommand(a, "/set format test act 'ADD' added", ""),
@@ -82,7 +82,7 @@
public void testSetFormatSelector() {
List<ReplTest> tests = new ArrayList<>();
- tests.add((a) -> assertCommandOutputStartsWith(a, "/set newmode ate -quiet",
+ tests.add((a) -> assertCommandOutputStartsWith(a, "/set mode ate -quiet",
"| Created new feedback mode: ate"));
tests.add((a) -> assertCommand(a, "/set feedback ate", ""));
StringBuilder sb = new StringBuilder();
@@ -162,7 +162,7 @@
(a) -> assertCommand(a, "String s = java.util.stream.IntStream.range(65, 74)"+
".mapToObj(i -> \"\"+(char)i).reduce((a,b) -> a + b + a).get()",
"s ==> \"ABACABADABACABAEABACABADABACABAFABACABADABACABAEABACABADABACABAGABACABADABA ..."),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode test -quiet", ""),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode test -quiet", ""),
(a) -> assertCommandOutputStartsWith(a, "/set feedback test", ""),
(a) -> assertCommand(a, "/set format test display '{type}:{value}' primary", ""),
(a) -> assertCommand(a, "/set truncation test 20", ""),
@@ -187,13 +187,13 @@
public void testSetNewModeQuiet() {
try {
test(
- (a) -> assertCommandOutputStartsWith(a, "/set newmode nmq -quiet normal", "| Created new feedback mode: nmq"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode nmq -quiet normal", "| Created new feedback mode: nmq"),
(a) -> assertCommand(a, "/set feedback nmq", ""),
- (a) -> assertCommand(a, "/se ne nmq2 -q nor", ""),
+ (a) -> assertCommand(a, "/se mo nmq2 -q nor", ""),
(a) -> assertCommand(a, "/se fee nmq2", ""),
- (a) -> assertCommand(a, "/set newmode nmc -command normal", ""),
+ (a) -> assertCommand(a, "/set mode nmc -command normal", ""),
(a) -> assertCommandOutputStartsWith(a, "/set feedback nmc", "| Feedback mode: nmc"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode nm", "| Created new feedback mode: nm"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode nm", "| Created new feedback mode: nm"),
(a) -> assertCommandOutputStartsWith(a, "/set feedback nm", "| Feedback mode: nm"),
(a) -> assertCommandOutputStartsWith(a, "/set feedback normal", "| Feedback mode: normal")
);
@@ -206,15 +206,15 @@
public void testSetError() {
try {
test(
- (a) -> assertCommandOutputStartsWith(a, "/set newmode tee -command foo",
+ (a) -> assertCommandOutputStartsWith(a, "/set mode tee -command foo",
"| Does not match any current feedback mode: foo"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode tee flurb",
- "| Specify either '-command' or '-quiet'"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode te2",
- "| Created new feedback mode: te2"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode te2 -command",
- "| Expected a new feedback mode name. 'te2' is a known feedback mode"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode te -command normal",
+ (a) -> assertCommandOutputStartsWith(a, "/set mode tee flurb",
+ "| Does not match any current feedback mode: flurb"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode tee",
+ "| Created new feedback mode: tee"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode verbose",
+ "| Not valid with a predefined mode: verbose"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode te -command normal",
"| Created new feedback mode: te"),
(a) -> assertCommand(a, "/set format te errorpre 'ERROR: '", ""),
(a) -> assertCommandOutputStartsWith(a, "/set feedback te",
@@ -226,17 +226,17 @@
(a) -> assertCommandOutputStartsWith(a, "/set f",
"ERROR: Ambiguous sub-command argument to '/set': f"),
(a) -> assertCommandOutputStartsWith(a, "/set feedback",
- "ERROR: Expected a feedback mode"),
+ "ERROR: Missing the feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set feedback xyz",
"ERROR: Does not match any current feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set format",
- "ERROR: Expected a feedback mode"),
+ "ERROR: Missing the feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set format xyz",
"ERROR: Does not match any current feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set format t",
"ERROR: Matches more then one current feedback mode: t"),
(a) -> assertCommandOutputStartsWith(a, "/set format te",
- "ERROR: Expected field name missing"),
+ "ERROR: Missing the field name"),
(a) -> assertCommandOutputStartsWith(a, "/set format te fld",
"ERROR: Expected format missing"),
(a) -> assertCommandOutputStartsWith(a, "/set format te fld aaa",
@@ -255,16 +255,12 @@
"ERROR: Expected truncation length"),
(a) -> assertCommandOutputStartsWith(a, "/set truncation te 111 import,added",
"ERROR: Different selector kinds in same sections of"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode",
- "ERROR: Expected new feedback mode"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode te",
- "ERROR: Expected a new feedback mode name"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode x xyz",
- "ERROR: Specify either '-command' or '-quiet'"),
- (a) -> assertCommandOutputStartsWith(a, "/set newmode x -quiet y",
+ (a) -> assertCommandOutputStartsWith(a, "/set mode",
+ "ERROR: Missing the feedback mode"),
+ (a) -> assertCommandOutputStartsWith(a, "/set mode x -quiet y",
"ERROR: Does not match any current feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt",
- "ERROR: Expected a feedback mode"),
+ "ERROR: Missing the feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt te",
"ERROR: Expected format missing"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt te aaa xyz",
@@ -272,7 +268,7 @@
(a) -> assertCommandOutputStartsWith(a, "/set prompt te 'aaa' xyz",
"ERROR: Format 'xyz' must be quoted"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt",
- "ERROR: Expected a feedback mode"),
+ "ERROR: Missing the feedback mode"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt te",
"ERROR: Expected format missing"),
(a) -> assertCommandOutputStartsWith(a, "/set prompt te aaa",