Skip to content

Commit

Permalink
Fix regexp for Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
alextu committed Dec 11, 2023
1 parent f83270d commit 8470413
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class TimestampPrefixDetector {

static final String TimestampPattern = "\\[\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z\\] ";
private static final Pattern TimestampPatternR = Pattern.compile("^(" + TimestampPattern + ").*\n?$");
private static final Pattern TimestampPatternR = Pattern.compile("^(" + TimestampPattern + ").*(?:\r?\n)?$");

static String trimTimestampPrefix(int prefix, String line) {
return line.substring(prefix);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ class GradleConsoleAnnotatorIntegrationTest extends BaseGradleIntegrationTest {
def b = j.buildAndAssertSuccess(pipelineJob)

then:
println "logs: \n${JenkinsRule.getLog(b)}"
def client = j.createWebClient()
def html = client.goTo(b.getUrl() + "console")
html.getByXPath("//b[@class='gradle-task']")*.textContent*.toString() == [
Expand Down

0 comments on commit 8470413

Please sign in to comment.