I'm a bit weary of exact string matching, what happens if there is an extra space between attributes or it doesn't contain that new line, perhaps the next version minor version of tesseract will produce a slightly different string.