void () { final TypedAction typedAction = TypedAction.getInstance(); final ConsoleViewImpl console = myConsole; final Editor editor = console.getEditor(); final DataContext dataContext = ((EditorEx)editor).getDataContext(); console.print("System output\n", ConsoleViewContentType.SYSTEM_OUTPUT); console.print("\r\r\r\r\r\r\r", ConsoleViewContentType.NORMAL_OUTPUT); console.flushDeferredText(); typedAction.actionPerformed(editor, '1', dataContext); typedAction.actionPerformed(editor, '2', dataContext); assertEquals("System output\n12", editor.getDocument().getText()); }