This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fold_grind.t: Add tests
fold-grind stresses the /i regex handling by reading the Unicode folding
rules and creating tests for problematic cases, as well as some
non-problematic ones.
Because of the large number of tests generated, it otherwise avoids
tests that it doesn't think are problematic.
Problematic cases include those whose folds cross the ordinal 127/128 or
255/256 boundaries, along with other considerations.
Until this commit, fold_grind failed to realize that even if the pair of
characters currently being tested don't cross those boundaries, if their
eventual folds do, this could be problematic. Suppose X and Y are both
on the same side of the boundaries, and both fold to Z which is on
another side. Then X and Y should be equivalent under /i even if the
fold to Z is prohibited because of /aa or /l. fold_grind was
overzealous in pruning such tests.
The previous patch fixed bugs in handling such cases; and this patch
fixes the tests to look for similar things that might possibly arise in
the future.
Interestingly, this bug came to light during porting to an EBCDIC
platform. The reason is that because of the different collation order,
fold_grind chose one of the buggy cases to test as one its
non-problematic tests.