diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-02-28 09:23:44 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2022-03-23 15:39:14 +0700 |
commit | af0e70f1615f256a43e798ab7b7fc3d53089f588 (patch) | |
tree | 99c7b02f452ae1ff2b3a7a877d74b8c085428bc2 /testing/src | |
parent | 3c80a365273b39c299cfdbc80c194cb9508e91a4 (diff) | |
download | aspectj-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/src')
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/RunSpec.java | 7 | ||||
-rw-r--r-- | testing/src/test/java/org/aspectj/testing/XMLBasedAjcTestCase.java | 1 |
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); |