Also switch the test case to use -NEXT to strictly match all lines. (cherry picked from commit 7d7d9e46)