Commit 22f30cb
committed
[libc++] Remove obsolete locale-specific regex tests
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 e.g. the traditional Spanish locale considers `[.ch.]`
to be a single collation element. Therefore, it seems that the locale
specific part of these tests is not relevant anymore, so 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).1 parent d62505f commit 22f30cb
File tree
17 files changed
+360
-1023
lines changed- libcxx/test/std/re
- re.alg
- re.alg.match
- re.alg.search
- re.traits
17 files changed
+360
-1023
lines changedLines changed: 0 additions & 136 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
573 | 573 | | |
574 | 574 | | |
575 | 575 | | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
576 | 599 | | |
577 | 600 | | |
578 | 601 | | |
| |||
1215 | 1238 | | |
1216 | 1239 | | |
1217 | 1240 | | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1218 | 1264 | | |
1219 | 1265 | | |
1220 | 1266 | | |
| |||
Lines changed: 0 additions & 125 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
575 | 575 | | |
576 | 576 | | |
577 | 577 | | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
578 | 601 | | |
579 | 602 | | |
580 | 603 | | |
| |||
1203 | 1226 | | |
1204 | 1227 | | |
1205 | 1228 | | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
1206 | 1252 | | |
1207 | 1253 | | |
1208 | 1254 | | |
| |||
0 commit comments