Skip to content

Commit ea25c35

Browse files
committed
Fixed EditorConsoleTest on Windows
For some reason the consolePane.getText() method returns the document text with single CR translated into OS native CR+LF. This will influence test outcome since we check various combinations of CR and LF.
1 parent ef5d316 commit ea25c35

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

app/src/processing/app/EditorConsole.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,13 @@ public void insertString(String str, SimpleAttributeSet attributes) throws BadLo
231231
}
232232

233233
public String getText() {
234-
return consoleTextPane.getText();
234+
try {
235+
return document.getText(0, document.getLength());
236+
} catch (BadLocationException e) {
237+
// Should never happen...
238+
e.printStackTrace();
239+
return "";
240+
}
235241
}
236242

237243
}

0 commit comments

Comments
 (0)