<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>Yeah, rich-text diffs on squeak-dev are not that bad, I could get used to this ... :-)</p>
<p><br>
</p>
<p>Best,</p>
<p>Christoph</p>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>Von:</b> Squeak-dev <squeak-dev-bounces@lists.squeakfoundation.org> im Auftrag von Thiede, Christoph<br>
<b>Gesendet:</b> Donnerstag, 28. Oktober 2021 05:44:26<br>
<b>An:</b> squeak-dev@lists.squeakfoundation.org<br>
<b>Betreff:</b> [squeak-dev] The Inbox: Regex-Tests-Core-ct.28</font>
<div> </div>
</div>
<div>Name: Regex-Tests-Core-ct.28<br>
Author: ct<br>
Time: 28 October 2021, 4:56:42.233233 am<br>
UUID: 4baf515d-1baa-814c-b109-26781d0698b1<br>
Ancestors: Regex-Tests-Core-mt.16<br>
<br>
==================== Summary ====================<br>
<br>
Complements Regex-Core-ct.71 (Unicode backslash atoms). Supersedes Regex-Tests-Core-ct.24. Merges Regex-Tests-Core-tobe.17.<br>
<br>
=============== Diff against Regex-Core-mt.61 ===============<br>
<br>
<b>RxMatcherTest>>testHenry039 {testing-henry} · ct 10/28/2021 02:44 (changed)</b><br>
testHenry039<br>
<font color="#0000FF">-     self runRegex: #('a[a-b-c]' nil)<br>
</font><font color="#FF0000">+     self runRegex: #('a[a-c-d]'<br>
+         'aa' true nil<br>
+         'ab' true nil<br>
+         'ac' true nil<br>
+         'ad' true nil<br>
+         'a-' true nil<br>
+         'ae' false nil)</font><br>
<br>
<b>RxParserTest>>testCharacterSetWithEscapedCharacters {tests} · ct 10/27/2021 23:17 (changed)</b><br>
testCharacterSetWithEscapedCharacters<br>
    "self debug: #testCharacterSetRange"<br>
    <br>
    {<br>
        '[\r]'. String cr. String space.<br>
        '[\n]'. String lf. String space.<br>
        '[\t]'. String tab. String space.<br>
        '[\e]'. Character escape asString. String space.<br>
        '[\f]'. Character newPage asString. String space.<br>
        '[\]]+'. ']]]'. '[[['.<br>
        '[\S]+[\s]+=[\s]+#[^\[(]'. 'foo = #bar'. 'foo = #[1 2 3]'.<br>
        '[\d]+'. '123'. 'abc'.<br>
        '[\D]+'. 'abc'. '123'.<br>
        '[\w]+'. 'a1_b2'. '...'.<br>
        '[\W]+'. '...'. 'a1_b2'.<br>
<font color="#FF0000">+         '[\b]'. 'b'. ' '.<br>
+         '[\p{L}\d]+'. 'tschüß123'. ':-)'.<br>
+         '[\P{L}a]'. 'a'. 'b'.<br>
</font>    } groupsDo: [ :regexString :inputToAccept :inputToReject |<br>
        | regex |<br>
        regex := regexString asRegex.<br>
        self<br>
            assert: (regex search: inputToAccept);<br>
            deny: (regex search: inputToReject) ]<br>
<br>
<b>RxParserTest>>testCodePointu {tests} · ct 10/28/2021 04:46</b><br>
<font color="#FF0000">+ testCodePointu<br>
+ <br>
+     | string |<br>
+     string := String value: 16r1f388.<br>
+     self assert: [string matchesRegex: '\u{1f388}'].<br>
+     self assert: ['A' matchesRegex: '\u0041'].<br>
+     self assert: ['Aa' matchesRegex: '\u0041a'].<br>
+     self assert: ['m' matchesRegex: '\u006D'].<br>
+     self assert: ['m' matchesRegex: '\u006d'].<br>
+     self should: ['\u004' asRegex] raise: RegexSyntaxError.<br>
+     self should: ['\u0g41' asRegex] raise: RegexSyntaxError.<br>
+     <br>
+     self assert: ['e' matchesRegex: '\u{ar101}'].<br>
+     self deny: [string matchesRegex: '\u{1f387}'].<br>
+     self deny: ['\u{1f388}' matchesRegex: '\u{1f388}'].<br>
+     self deny: ['1f388' matchesRegex: '\u{1f388}'].<br>
+     self deny: ['u' matchesRegex: '\u{1}'].<br>
+     self deny: [(String value: 16r1f389) matchesRegex: '\u{1f388}'].<br>
+     self deny: [(WideString fromByteArray: #(16r17f3 16r88)) matchesRegex: '\u{1f388}'].<br>
+     self deny: [(WideString fromByteArray: #(16r17f3 88)) matchesRegex: '\u{1f388}'].<br>
+     <br>
+     self assert: ['m' matchesRegex: '[\u006d]'].<br>
+     self assert: ['3' matchesRegex: '[\u0032-4]'].<br>
+     self deny: ['0' matchesRegex: '[\u0032-4]'].<br>
+     self assert: ['3' matchesRegex: '[2-\u0034]'].<br>
+     self deny: ['0' matchesRegex: '[2-\u0034]'].<br>
+     self should: ['[\u006d-\d]' asRegex] raise: RegexSyntaxError.<br>
+     self should: ['[\d-\u006d]' asRegex] raise: RegexSyntaxError.<br>
+     self assert: ['A' matchesRegex: '[\u006d-\u006fA]'].</font><br>
<br>
<b>RxParserTest>>testCodePointx {tests} · ct 10/28/2021 04:47</b><br>
<font color="#FF0000">+ testCodePointx<br>
+ <br>
+     self assert: ['8' matchesRegex: '\x38'].<br>
+     self deny: ['8' matchesRegex: '\x39'].<br>
+     self deny: ['9' matchesRegex: '\x38'].<br>
+     self deny: ['&' matchesRegex: '\x38'].<br>
+     self deny: ['\x38' matchesRegex: '\x38'].<br>
+     self deny: ['38' matchesRegex: '\x38'].<br>
+     self assert: ['8a' matchesRegex: '\x38a'].<br>
+     self should: ['\x3' asRegex] raise: RegexSyntaxError.<br>
+     self deny: [(WideString fromByteArray: {3. 8}) matchesRegex: '\x38'].<br>
+     self deny: [(WideString fromByteArray: {3. 38}) matchesRegex: '\x38'].<br>
+     self deny: [(String new: 20 withAll: $x) matchesRegex: '\x20'].<br>
+     <br>
+     self assert: ['8' matchesRegex: '\x{38}'].<br>
+     self assert: ['?' matchesRegex: '\x{38a}'].<br>
+     self assert: ['8' matchesRegex: '\x{2r111000}'].<br>
+     self deny: ['8' matchesRegex: '\x{39}'].<br>
+     self deny: ['9' matchesRegex: '\x{38}'].<br>
+     self deny: ['\x{38}' matchesRegex: '\x{38}'].<br>
+     <br>
+     self assert: ['8a' matchesRegex: '[\x38a]+'].</font><br>
<br>
<b>RxParserTest>>testRegexSyntaxErrorPosition {tests} · ct 10/28/2021 03:14</b><br>
<font color="#FF0000">+ testRegexSyntaxErrorPosition<br>
+ <br>
+     | position |<br>
+     ['a::z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 3 equals: position.<br>
+     ['a[b[:space:_]y]z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 12 equals: position.<br>
+     ['a[^][::]]z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 8 equals: position.<br>
+     <br>
+     "During nested parsing, the global position must be provided"<br>
+     ['a\x{}z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 5 equals: position.<br>
+     ['a[b\x{}y]z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 7 equals: position.<br>
+     ['a[^b\x{}y]z' asRegex] on: RegexSyntaxError do: [:ex | position := ex position].<br>
+     self assert: 8 equals: position.</font><br>
<br>
<b>RxParserTest>>testUnicodeCategory {tests} · ct 10/28/2021 04:47</b><br>
<font color="#FF0000">+ testUnicodeCategory<br>
+ <br>
+     self assert: ['X' matchesRegex: '\p{Lu}'].<br>
+     self assert: ['X' matchesRegex: '\p{L}'].<br>
+     self deny: ['X' matchesRegex: '\p{Ll}'].<br>
+     self assert: ['x' matchesRegex: '\p{Ll}'].<br>
+     self assert: ['x' matchesRegex: '\p{L}'].<br>
+     self deny: ['x' matchesRegex: '\p{Lu}'].<br>
+     <br>
+     self deny: ['X' matchesRegex: '\P{Lu}'].<br>
+     self deny: ['X' matchesRegex: '\P{L}'].<br>
+     self assert: ['X' matchesRegex: '\P{Ll}'].<br>
+     self deny: ['x' matchesRegex: '\P{Ll}'].<br>
+     self deny: ['x' matchesRegex: '\P{L}'].<br>
+     self assert: ['x' matchesRegex: '\P{Lu}'].<br>
+     <br>
+     self assert: ['x' matchesRegex: '[\p{L}]'].<br>
+     self deny: ['x' matchesRegex: '[\P{L}]'].<br>
+     self assert: ['x' matchesRegex: '[^\P{L}]'].</font><br>
<br>
<br>
<font color="#808080">---<br>
</font><i><font color="#808080">Sent from </font></i><i><u><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><font color="#808080">Squeak Inbox Talk</font></a></u></i><br>
["Regex-Tests-Core-ct.28.mcz"]</div>
</body>
</html>