@@ -348,11 +348,11 @@ test regexp-10.3 {newline sensitivity in regsub} {
348348 set foo xxx
349349 list [regsub -line {^a.*b$} "dabc\naxyb\nxb" 123 foo] $foo
350350} "1 {dabc\n123\nxb}"
351- test regexp-10.4 {partial newline sensitivity in regsub} {
351+ test regexp-10.4 {partial newline sensitivity in regsub} regexp_are {
352352 set foo xxx
353353 list [regsub -lineanchor {^a.*b$} "da\naxyb\nxb" 123 foo] $foo
354354} "1 {da\n123}"
355- test regexp-10.5 {inverse partial newline sensitivity in regsub} {
355+ test regexp-10.5 {inverse partial newline sensitivity in regsub} regexp_are {
356356 set foo xxx
357357 list [regsub -linestop {a.*b} "da\nbaxyb\nxb" 123 foo] $foo
358358} "1 {da\nb123\nxb}"
@@ -497,7 +497,7 @@ test regexp-16.3 {regsub -start} {
497497 catch {unset x}
498498 list [regsub -all -start 3 {z} hello {/&} x] $x
499499} {0 hello}
500- test regexp-16.4 {regsub -start, \A behavior} {
500+ test regexp-16.4 {regsub -start, \A behavior} regexp_are {
501501 set out {}
502502 lappend out [regsub -start 0 -all {\A(\w)} {abcde} {/\1} x] $x
503503 lappend out [regsub -start 2 -all {\A(\w)} {abcde} {/\1} x] $x
@@ -649,7 +649,7 @@ test regexp-21.9 {regexp works with empty string offset} {
649649 regexp -start 3 -- \$ {123}
650650} {1}
651651
652- test regexp-21.10 {multiple matches handle newlines} {
652+ test regexp-21.10 {multiple matches handle newlines} regexp_are {
653653 regsub -all -lineanchor -- {^#[^\n]*\n} "#one\n#two\n#three\n" foo\n
654654} "foo\nfoo\nfoo\n"
655655
@@ -678,7 +678,7 @@ test regexp-21.16 {Replace nothing} {
678678 regsub -all {x*} anything !
679679} {!a!n!y!t!h!i!n!g!}
680680
681- test regexp-21.17 {Replace nothing via empty pattern} {
681+ test regexp-21.17 {Replace nothing via empty pattern} regexp_are {
682682 # Interestingly in this case Tcl does not match
683683 # at end of string while the previous case does
684684 regsub -all {} anything !
@@ -689,25 +689,25 @@ test regexp-22.1 {char range} {
689689} {aa bca baaccc}
690690
691691# Tcl doesn't like this
692- test regexp-22.2 {reversed char range} jim {
692+ test regexp-22.2 {reversed char range} { jim regexp_are} {
693693 regexp -all -inline {[c-a]+} "defaaghbcadfbaacccd"
694694} {aa bca baaccc}
695695
696696# Note that here the hex escapes are interpreted by regexp, not by Tcl
697- test regexp-22.3 {hex digits} {
697+ test regexp-22.3 {hex digits} regexp_are {
698698 regexp -all -inline {[\x6a-\x6c]+} "jlaksdjflkwueorilkj"
699699} {jl k j lk lkj}
700700
701- test regexp-22.4 {uppercase hex digits} {
701+ test regexp-22.4 {uppercase hex digits} regexp_are {
702702 regexp -all -inline {[\x6A-\x6C]+} "jlaksdjflkwueorilkj"
703703} {jl k j lk lkj}
704704
705705# Below \x9X will be treated as \x9 followed by X
706- test regexp-22.5 {invalid hex digits} {
706+ test regexp-22.5 {invalid hex digits} regexp_are {
707707 regexp -all -inline {[\x9X\x6C]+} "jla\tX6djflyw\tueorilkj"
708708} [list l \tX l \t l]
709709
710- test regexp-22.6 {unicode hex digits} jim {
710+ test regexp-22.6 {unicode hex digits} { jim regexp_are} {
711711 regexp -all -inline {[\u{41}-\u{00043}]+} "AVBASDFBABDFBAFBAFA"
712712} {A BA BAB BA BA A}
713713
@@ -716,15 +716,15 @@ test regexp-22.7 {unicode hex digits with invalid exscape} jim {
716716 regexp -all -inline {[\u{X41}]+} "uVBAX{SD4B1}DFBAFBAFA"
717717} {u X\{ 4 1\}}
718718
719- test regexp-22.8 {unicode hex digits} {
719+ test regexp-22.8 {unicode hex digits} regexp_are {
720720 regexp -all -inline {[\u0041-\u0043]+} "AVBASDFBABDFBAFBAFA"
721721} {A BA BAB BA BA A}
722722
723- test regexp-22.9 {\U unicode hex digits} {
723+ test regexp-22.9 {\U unicode hex digits} regexp_are {
724724 regexp -all -inline {[\U00000041-\U00000043]+} "AVBASDFBABDFBAFBAFA"
725725} {A BA BAB BA BA A}
726726
727- test regexp-22.10 {Various char escapes} {
727+ test regexp-22.10 {Various char escapes} regexp_are {
728728 set result {}
729729 foreach match [regexp -all -inline {[\e\f\v\t\b]+} "A\f\vBB\b\tC\x1BG"] {
730730 set chars {}
@@ -737,15 +737,15 @@ test regexp-22.10 {Various char escapes} {
737737 join $result |
738738} {12,11|8,9|27}
739739
740- test regexp-22.11 {backslash as last char} -body {
740+ test regexp-22.11 {backslash as last char} -constraints regexp_are - body {
741741 regexp -all -inline "\[a\\" "ba\\d\[ef"
742742} -returnCodes error -result {couldn't compile regular expression pattern: invalid escape \ sequence}
743743
744- test regexp-22.12 {missing closing bracket} -body {
744+ test regexp-22.12 {missing closing bracket} -constraints regexp_are - body {
745745 regexp -all -inline {[abc} "abcdefghi"
746746} -returnCodes error -result {couldn't compile regular expression pattern: brackets [] not balanced}
747747
748- test regexp-22.13 {empty alternative} {
748+ test regexp-22.13 {empty alternative} regexp_are {
749749 regexp -all -inline {a(a|b|)c} "aacbacbaa"
750750} {aac a ac {}}
751751
@@ -757,11 +757,11 @@ test regexp-22.15 {- in set} {
757757 regexp -all -inline {[-ab]+} "aac\[ba\]cb-aa"
758758} {aa ba b-aa}
759759
760- test regexp-22.16 {\s in set} {
760+ test regexp-22.16 {\s in set} regexp_are {
761761 regexp -all -inline {[\sa]+} "aac\[b a\]c\tb-aa"
762762} [list aa " a" \t aa]
763763
764- test regexp-22.17 {\d in set} {
764+ test regexp-22.17 {\d in set} regexp_are {
765765 regexp -all -inline {[a\d]+} "a0ac\[b a\]44c\tb-1aa7"
766766} {a0a a 44 1aa7}
767767
@@ -784,13 +784,13 @@ test regexp-27.5 {regsub -command} {
784784test regexp-27.6 {regsub -command} {
785785 regsub -command -all {(.)(.)} {abcdef} {list ,}
786786} {, ab a b, cd c d, ef e f}
787- test regexp-27.7 {regsub -command representation smash} {
787+ test regexp-27.7 {regsub -command representation smash} regexp_are {
788788 set ::s {123=456 789}
789789 regsub -command -all {\d+} $::s {apply {n {
790790 expr {[llength $::s] + $n}
791791 }}}
792792} {125=458 791}
793- test regexp-27.8 {regsub -command representation smash} {
793+ test regexp-27.8 {regsub -command representation smash} regexp_are {
794794 set ::t {apply {n {
795795 expr {[llength [lindex $::t 1 1 1]] + $n}
796796 }}}
@@ -812,15 +812,15 @@ test reg-31.1 {[[:xdigit:]] behaves correctly when followed by [[:space:]]} {
812812 # Code used to produce {1 2:::DebugWin32 2 :::DebugWin32} !!!
813813} {1 2 2 {}}
814814
815- test reg-31.2 {scanner not reset in failed optional group} {
815+ test reg-31.2 {scanner not reset in failed optional group} regexp_are {
816816 regexp -inline {^(?:(-)(?:(\w[\w-]*)\|)?)?(\w[\w-]*)$} -debug
817817} {-debug - {} debug}
818818
819- test reg-31.2 {invalid digit check in class} -body {
819+ test reg-31.2 {invalid digit check in class} -constraints regexp_are - body {
820820 regexp {[[:digit:\0]} 1
821821} -returnCodes error -result {couldn't compile regular expression pattern: brackets [] not balanced}
822822
823- test reg-31.3 {invalid trailing backslash} -body {
823+ test reg-31.3 {invalid trailing backslash} -constraints regexp_are - body {
824824 regexp "\[abc\\" a
825825} -returnCodes error -result {couldn't compile regular expression pattern: invalid escape \ sequence}
826826
0 commit comments