Simplify multiline matching in functional tests