X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.scl.compiler%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Fcommands%2FTestScriptExecutor.java;h=4afeef91c69b83f884aaacaa4b3baeb2e965d862;hp=ab39d538a23a4f808440855956ea15a5b8e02d40;hb=51006ffec13cbf8e0d9c8b07212d69478e4bdd4e;hpb=969bd23cab98a79ca9101af33334000879fb60c5 diff --git a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/commands/TestScriptExecutor.java b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/commands/TestScriptExecutor.java index ab39d538a..4afeef91c 100644 --- a/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/commands/TestScriptExecutor.java +++ b/bundles/org.simantics.scl.compiler/src/org/simantics/scl/compiler/commands/TestScriptExecutor.java @@ -12,11 +12,17 @@ public class TestScriptExecutor { 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 { @@ -67,7 +73,8 @@ public class TestScriptExecutor { @Override public void print(String text) { handler.print(text); - actualResponse.append(text).append('\n'); + if (!ignorePrints) + actualResponse.append(text).append('\n'); } @Override