[1.6.x] Modified test added in 3afb5916b2 so it doesn't fail on Windows.

Refs #18091.

12ca312e1b from master.