Permalink
Browse files

fix 'bpipe errors' not showing log output if hyphen in branch

  • Loading branch information...
ssadedin committed Oct 6, 2017
1 parent c44ae9a commit d99ba20bac711349a7ac960c1979e86f83442bcc
Showing with 15 additions and 1 deletion.
  1. +1 −1 src/main/groovy/bpipe/OutputLogIterator.groovy
  2. +14 −0 test-src/bpipe/OutputLogIteratorTest.groovy
@@ -37,7 +37,7 @@ class OutputLogIterator implements Iterator<OutputLogEntry> {
reader = r
}
static Pattern tagPattern = ~'^\\[([a-zA-Z0-9_]*)\\.([0-9]*)\\]'
static Pattern tagPattern = ~'^\\[([a-zA-Z0-9_-]*)\\.([0-9]*)\\]'
@CompileStatic
@Override
@@ -64,4 +64,18 @@ cp -uv s_1.txt.take_me_to_your_leader s_1.txt.take_me_to_your_leader.a
}
}
@Test
void testComplexBranches() {
String line = "[170914_NB501544_0178_ML171430_17W000588_STAR-20170831_SSQXTCRE.1581]\t##### ERROR A USER ERROR has occurred (version 3.6-0-g89b7209):\n"
def i = new OutputLogIterator(new StringReader(line))
assert i.hasNext()
OutputLogEntry ole = i.next()
println ole.commandId
assert ole.commandId == "1581"
}
}

0 comments on commit d99ba20

Please sign in to comment.