Fix the 'test' mode of the 'network' state module.  It hit false positives due to inconsistent newline handling.
Merge pull request #16306 from hathawsh/develop

This patch fixes the 'test' mode of the 'network' state module.