Check if output contains a pattern.
bool containsPattern(Pattern pattern) => pattern.allMatches(_buffer.toString()).isNotEmpty;