[libc++] Remove obsolete locale-specific regex tests (#159590)
After a recent macOS update, several of the locale-specific regex tests
started failing. These tests were mainly testing two locale specific
features of regular expressions:
- A character class like `[=x=]` matches any character that is
considered equivalent to `x` according to the collation rules of the
current locale.
- A character class like `[[.ch.]]` matches anything that is equivalent
to `ch` (whether as two letters or as a single collation element) in the
current locale.
However, these tests were relying on platform-specific localization
data, specifically they were only working with older macOS localization
data. As can be seen from the numerous XFAILs, most mainstream platforms
didn't actually pass this test. After the macOS update, macOS itself
also doesn't pass these tests anymore.
I looked at whether there are locales where these tests would still make
sense, and I couldn't find any. I am not a localization expert, but it
appears that only legacy locales like the traditional Spanish locale
(which isn't commonly shipped on systems anymore) considers `[.ch.]` to
be a single collation element. Therefore, it seems that the locale
specific part of these tests is not relevant anymore, and this patch
removes them.
The patch also moves some tests for equivalence classes inside character
classes to their non locale-specific tests, since that feature was not
covered there.
Finally, the lookup_collatename.pass.cpp test was fixed by removing an
assertion that `ch` is a collation element in the CZ locale, which seems
to not be the case in recent localization data (and appears to be the
root cause for about half the failures in these tests).