private final CommandSession session;
private final BufferedReader reader;
private final SCLReportingHandler handler;
+ private boolean ignorePrints;
public TestScriptExecutor(CommandSession session, BufferedReader reader, SCLReportingHandler handler) {
+ this(session, reader, handler, false);
+ }
+
+ public TestScriptExecutor(CommandSession session, BufferedReader reader, SCLReportingHandler handler, boolean ignorePrints) {
this.session = session;
this.reader = reader;
this.handler = handler == null ? SCLReportingHandler.DEFAULT : handler;
+ this.ignorePrints = ignorePrints;
}
public void execute() throws IOException {
@Override
public void print(String text) {
handler.print(text);
- actualResponse.append(text).append('\n');
+ if (!ignorePrints)
+ actualResponse.append(text).append('\n');
}
@Override