Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIXED JENKINS-15914] Fixed comments logic
  • Loading branch information
kinow committed Nov 25, 2012
1 parent 17c387b commit 490d52e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
6 changes: 6 additions & 0 deletions src/main/java/org/tap4j/plugin/TapResult.java
Expand Up @@ -43,6 +43,7 @@
import org.tap4j.consumer.TapConsumer;
import org.tap4j.consumer.TapConsumerFactory;
import org.tap4j.model.BailOut;
import org.tap4j.model.Comment;
import org.tap4j.model.Directive;
import org.tap4j.model.TestResult;
import org.tap4j.model.TestSet;
Expand Down Expand Up @@ -202,6 +203,7 @@ private boolean isFailure(TestResult testResult) {
boolean r = false;
Directive directive = testResult.getDirective();
StatusValues status = testResult.getStatus();
// TODO !
if (directive != null
&& directive.getDirectiveValue() == DirectiveValues.TODO) {
r = true;
Expand All @@ -225,6 +227,10 @@ public boolean isTestResult(Object tapResult) {
public boolean isBailOut(Object tapResult) {
return (tapResult != null && tapResult instanceof BailOut);
}

public boolean isComment(Object tapResult) {
return (tapResult != null && tapResult instanceof Comment);
}

/**
* @return the name
Expand Down
11 changes: 9 additions & 2 deletions src/main/resources/org/tap4j/plugin/tags/line.jelly
Expand Up @@ -6,7 +6,6 @@
<j:when test="${attrs.tapLine != null}">
<j:set var="tapLine" value="${attrs.tapLine}" />
<j:set var="tapFile" value="${attrs.tapFile}" />

<j:choose>
<j:when test="${it.isTestResult( tapLine )}">
<tr>
Expand All @@ -16,7 +15,7 @@
<tap:directive directive="${tapLine.directive}" />
</tr>
<!-- Comments diagnostics -->
<tap:comments diagnostic="${tapLine.comments}" />
<!-- tap:comments diagnostic="${tapLine.comments}" /-->
<!-- YAML Diagnostics -->
<tap:yaml diagnostic="${tapLine.diagnostic}" tapFile="${tapFile}" />
</j:when>
Expand All @@ -28,6 +27,14 @@
<tap:directive directive="" />
</tr>
</j:when>
<j:when test="${it.isComment( tapLine )}">
<tr>
<td></td>
<td colspan='3'>
# ${tapLine.text}<br/>
</td>
</tr>
</j:when>
</j:choose>
</j:when>
<j:otherwise></j:otherwise>
Expand Down

0 comments on commit 490d52e

Please sign in to comment.