zlib: Don't use PASTE for INTMAX error messages
[jimtcl.git] / tests / regmin.test
blobed4f1cd4ee988afa0ab3dab7272e98b6b0084339
1 source [file dirname [info script]]/testing.tcl
3 needs cmd regexp
4 testConstraint regexp_are [regexp {\d} 1]
5 needs constraint regexp_are
7 test regexpmin-1.1 {Minimal +} {
8     regexp -inline {x(a|b|c)+?c} xabcabc
9 } {xabc b}
11 test regexpmin-1.2 {Maximal +} {
12     regexp -inline {x(a|b|c)+c} xabcabc
13 } {xabcabc b}
15 test regexpmin-1.3 {Minimal *} {
16     regexp -inline {x(a|b)*?} xababcabc
17 } {x {}}
19 test regexpmin-1.4 {Maximal *} {
20     regexp -inline {x(a|b)*} xababcabc
21 } {xabab b}
23 test regexpmin-1.5 {Maximal ?} {
24     regexp -inline {x(a|b)?} xababcabc
25 } {xa a}
27 test regexpmin-1.6 {Minimal ?} {
28     regexp -inline {x(a|b)??} xababcabc
29 } {x {}}
31 test regexpmin-1.7 {Maximal html} {
32         regexp -inline {<(.+)>} <foo><bar><grill>
33 } {<foo><bar><grill> foo><bar><grill}
35 test regexpmin-1.8 {Minimal html} {
36         regexp -inline {<(.+?)>} <foo><bar><grill>
37 } {<foo> foo}
39 test regexpmin-2.1 {utf8 repeat} utf8 {
40         regexp -inline {a\u00df+}  a\udf\udf\udf\udf\ub5z
41 } "a\udf\udf\udf\udf"
43 test regexpmin-2.2 {utf8 min repeat} utf8 {
44         regexp -inline {a\u00df+?}  a\udf\udf\udf\udf\ub5z
45 } "a\udf"
47 test regexpmin-3.1 {non-capturing paren} {
48     regexp -inline {x(?:a|b)?} xababcabc
49 } {xa}
51 test regexpmin-3.2 {non-capturing paren} {
52     regexp -inline {x(?:a|b)?.*(b|c)} xababcabc
53 } {xababcabc c}
55 testreport