Skip to content

Commit 7195e5d

Browse files
committed
Add test for \b{sb}
It turns out that the merge commit f0bd363 makes \b{sb} work much better, with the main improvement being by commit 43a7bd6. We were puzzled as to why it didn't seem to work as advertised, yet passed all the extensive tests furnished by Unicode. The answer appears to be that that those tests mostly test pair-wise things, and the bug was because results were getting overwritten for longer inputs. This new test is a simple, but long one.
1 parent de08546 commit 7195e5d

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

pod/perldelta.pod

+6-1
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,12 @@ files in F<ext/> and F<lib/> are best summarized in L</Modules and Pragmata>.
338338

339339
=item *
340340

341-
XXX
341+
C<\b{sb}> works much better. In Perl v5.22.0, this new construct didn't
342+
seem to give the expected results, yet passed all the tests in the
343+
extensive suite furnished by Unicode. It turns out that it was because
344+
these were short input strings, and the failures had to do with longer
345+
inputs. This was fixed in Perl 5.23.4, but the improvement was not
346+
noticed until after that was released, so is included here now.
342347

343348
=back
344349

t/re/pat_advanced.t

+3
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,9 @@ EOF
23162316
is "$1" || $@, "at", 'empty \N{...} stringified and retoked';
23172317
}
23182318

2319+
is (scalar split(/\b{sb}/, "Don't think twice. It's all right."),
2320+
2, '\b{wb} splits sentences correctly');
2321+
23192322

23202323
# !!! NOTE! Keep the following tests last -- they may crash perl
23212324

0 commit comments

Comments
 (0)