summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2011-06-02 22:14:37 -0600
committerKarl Williamson <public@khwilliamson.com>2011-06-25 14:00:32 -0600
commit43d32dfff0307a53909d889f16182a4c40647c3b (patch)
treeda072e3d908485a8601deaeb13332260a5cec99b
parente9ad586644d568ed64a8ca00a92daaf66ca17ab9 (diff)
downloadperl-43d32dfff0307a53909d889f16182a4c40647c3b.tar.gz
fold_grind.t: Add comments
-rw-r--r--t/re/fold_grind.t12
1 files changed, 10 insertions, 2 deletions
diff --git a/t/re/fold_grind.t b/t/re/fold_grind.t
index 5a607d7873..b8a1acba3b 100644
--- a/t/re/fold_grind.t
+++ b/t/re/fold_grind.t
@@ -153,8 +153,8 @@ sub add_test($@) {
# comprehensively, we would try every combination of upper and lower
# case in the fold, but it will have to suffice to avoid running
# forever to make sure that each thing that folds to these is tested
- # at least once. Because of complement matching, we need to do both
- # the folded, and the folded-from.
+ # at least once. Because of complement matching ([^...]), we need to
+ # do both the folded, and the folded-from.
# We first look at each character in the multi-char fold, and save how
# many characters fold to it; and also the maximum number of such
# folds
@@ -174,6 +174,14 @@ sub add_test($@) {
# We will need to generate as many tests as the maximum number of
# folds, so that each fold will have at least one test.
+ # For example, consider character X which folds to the three character
+ # string 'xyz'. If 2 things fold to x (X and x), 4 to y (Y, Y'
+ # (Y-prime), Y'' (Y-prime-prime), and y), and 1 thing to z (itself), 4
+ # tests will be generated:
+ # xyz
+ # XYz
+ # xY'z
+ # xY''z
for (my $i = 0; $i < $max_folds_to; $i++) {
my @this_test_to; # Assemble a single test