aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2022-02-28 09:23:44 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-23 15:39:14 +0700
commitaf0e70f1615f256a43e798ab7b7fc3d53089f588 (patch)
tree99c7b02f452ae1ff2b3a7a877d74b8c085428bc2 /testing
parent3c80a365273b39c299cfdbc80c194cb9508e91a4 (diff)
downloadaspectj-af0e70f1615f256a43e798ab7b7fc3d53089f588.tar.gz
aspectj-af0e70f1615f256a43e798ab7b7fc3d53089f588.zip
RunSpec: allow '<stdout ordered="no">'
Previously 'ordered="no"' was only permitted for 'stderr'. We need this for tests with asynchronous log output on standard error. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'testing')
-rw-r--r--testing/src/test/java/org/aspectj/testing/RunSpec.java7
-rw-r--r--testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java1
2 files changed, 7 insertions, 1 deletions
diff --git a/testing/src/test/java/org/aspectj/testing/RunSpec.java b/testing/src/test/java/org/aspectj/testing/RunSpec.java
index d687ae86b..9e07f8a44 100644
--- a/testing/src/test/java/org/aspectj/testing/RunSpec.java
+++ b/testing/src/test/java/org/aspectj/testing/RunSpec.java
@@ -36,6 +36,7 @@ public class RunSpec implements ITestStep {
private String options;
private String cpath;
private String mpath;
+ private String orderedStdout;
private String orderedStderr;
private AjcTest myTest;
private OutputSpec stdErrSpec;
@@ -78,7 +79,7 @@ public class RunSpec implements ITestStep {
stdErrSpec.matchAgainst(rr.getStdErr(), orderedStderr);
}
if (stdOutSpec != null) {
- stdOutSpec.matchAgainst(rr.getStdOut());
+ stdOutSpec.matchAgainst(rr.getStdOut(), orderedStdout);
}
} finally {
restoreProperties();
@@ -171,6 +172,10 @@ public class RunSpec implements ITestStep {
this.orderedStderr = orderedStderr;
}
+ public void setOrderedStdout(String orderedStdout) {
+ this.orderedStdout = orderedStdout;
+ }
+
public String getClassToRun() {
return classToRun;
}
diff --git a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java
index 3954c7ecc..6af8ced47 100644
--- a/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java
+++ b/testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java
@@ -251,6 +251,7 @@ public abstract class XMLBasedAjcTestCase extends AjcTestCase {
digester.addSetProperties("suite/ajc-test/run", "module", "moduleToRun");
digester.addSetProperties("suite/ajc-test/run", "ltw", "ltwFile");
digester.addSetProperties("suite/ajc-test/run", "xlintfile", "xlintFile");
+ digester.addSetProperties("suite/ajc-test/run/stdout", "ordered", "orderedStdout");
digester.addSetProperties("suite/ajc-test/run/stderr", "ordered", "orderedStderr");
digester.addSetNext("suite/ajc-test/run", "addTestStep", "org.aspectj.testing.ITestStep");
digester.addObjectCreate("*/message", ExpectedMessageSpec.class);