The Trunk: Regex-Tests-Core-ct.39.mcz
[email protected] Wed, 17 Jun 2026 20:13:23 0000
| Newsgroups | gmane.comp.lang.smalltalk.squeak.general |
|---|---|
| Message-ID | <[email protected]> |
Christoph Thiede uploaded a new version of Regex-Tests-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Tests-Core-ct.39.mcz
==================== Summary ====================
Name: Regex-Tests-Core-ct.39
Author: ct
Time: 17 June 2026, 10:13:22.984134 pm
UUID: 21f6605a-3beb-4330-a662-56c654a851ba
Ancestors: Regex-Tests-Core-ct.38
Documents expected order of captured subexpressions within branches. This was an undermentioned breaking fix from Regex-Core-ct.78 (only noted in the revision comment regarding Regex-Core-ct.66).
In Squeak 6.0, this test would have had to look like this instead:
testCapturesWithinBranches
self runRegex: #('((a)|(b)(c))(d)'
'ad' true (1 'ad' 2 'a' 3 nil 4 nil 5 'a' 6 'd')
'bcd' true (1 'bcd' 2 'bc' 3 'b' 4 'c' 5 nil 6 'd')).
So we are now correctly ordering captured subexpressions in branches strictly from left to right according to their opening bracket in the pattern, not right to left.
=============== Diff against Regex-Tests-Core-ct.38 ===============
Item was added:
+ ----- Method: RxMatcherTest>>testCapturesWithinBranches (in category 'testing') -----
+ testCapturesWithinBranches
+
+ self runRegex: #('((a)|(b)(c))(d)'
+ 'ad' true (1 'ad' 2 'a' 3 'a' 4 nil 5 nil 6 'd')
+ 'bcd' true (1 'bcd' 2 'bc' 3 nil 4 'b' 5 'c' 6 'd')).
+ self flag: #tests. "ct: It might be helpful to test subexpressionCount, too"!
Squeak-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]