The old expected behaviour was specific to Apple platforms, while Glibc, Windows and FreeBSD collate differently (ignoring case). Make the old tested behaviour a special case for Apple platforms, and make the default case the one used by the other three.
In clang-cl/DLL configurations, the test is hit by https://llvm.org/PR41018 (making the test fail to link).
Both glibc and Win32 have a different collation order from libc++-on-Apple. Are they the same collation order? Is this just a bug on Apple, perhaps?
That said, lines 47-62 totally reasonable to me. They're using std::collate in the en_US.UTF-8 locale to compare "aaaaaaA" against "BaaaaaA", and expecting "B" to collate after "a" in dictionary order. That seems totally fine and correct to me.
Lines 66-81 look fishy. They're doing the same dictionary-order test, but in the C locale! Isn't the C locale supposed to use basically strcmp to do its collation? B should sort before a in strcmp order. I suspect that perhaps this test should be flipped, enabled on Linux and XFAILed (if necessary) on Apple targets.