Makes the locale test not always pass, be verbose when it is skipped.

Makes tests that use `setlocale` consistent with #1521.