Skip to content

Commit 340fb02

Browse files
committed
WIP
1 parent 123bbb0 commit 340fb02

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

core/src/main/java/io/cucumber/core/plugin/TeamCityPlugin.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ private String extractSourceLocation(TestStep testStep) {
224224
if (java8Matcher.matches()) {
225225
String declaringClassName = java8Matcher.group(1);
226226
String line = java8Matcher.group(2);
227-
// TODO: Doesn't work with IDEA
227+
// TODO: Doesn't work with IDEA. What does?
228228
return String.format("java:test://%s:%s", declaringClassName, line);
229229
}
230230

@@ -240,18 +240,18 @@ private void printTestStepFinished(TestStepFinished event) {
240240
Status status = event.getResult().getStatus();
241241
switch (status) {
242242
case SKIPPED:
243-
print(TEMPLATE_TEST_IGNORED, timeStamp, duration, error == null ? "Skipped step" : error.getMessage(), name);
243+
print(TEMPLATE_TEST_IGNORED, timeStamp, duration, error == null ? "Step skipped" : error.getMessage(), name);
244244
break;
245245
case PENDING:
246-
print(TEMPLATE_TEST_IGNORED, timeStamp, duration, error == null ? "Pending step" : error.getMessage(), name);
246+
print(TEMPLATE_TEST_IGNORED, timeStamp, duration, error == null ? "Step pending" : error.getMessage(), name);
247247
break;
248248
case UNDEFINED:
249249
PickleStepTestStep testStep = (PickleStepTestStep) event.getTestStep();
250250
print(TEMPLATE_TEST_FAILED, timeStamp, duration, getSnippet(testStep), name);
251251
break;
252252
case AMBIGUOUS:
253253
case FAILED:
254-
String message = error.getMessage();
254+
String message = "Step failed";
255255
String details = extractStackTrace(error);
256256
print(TEMPLATE_TEST_FAILED, timeStamp, duration, message, details, name);
257257
break;
@@ -368,10 +368,10 @@ private String escape(String source) {
368368
return "";
369369
}
370370
return source
371+
.replace("|", "||")
371372
.replace("'", "|'")
372373
.replace("\n", "|n")
373374
.replace("\r", "|r")
374-
.replace("|", "||")
375375
.replace("[", "|[")
376376
.replace("]", "|]");
377377
}

0 commit comments

Comments
 (0)