Diff
Not logged in

Differences From Artifact [d3fbcf4658]:

To Artifact [41aef8269c]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# reg.test --
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
# (Don't panic if you are seeing this as part of the reg distribution
# and aren't using Tcl -- reg's own regression tester also knows how
# to read this file, ignoring the Tcl-isms.)
#
# Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
#
# RCS: @(#) $Id: reg.test,v 1.25 2008/03/19 13:39:28 dkf Exp $

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest 2
}

# All tests require the testregexp command, return if this
# command doesn't exist











|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# reg.test --
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
# (Don't panic if you are seeing this as part of the reg distribution
# and aren't using Tcl -- reg's own regression tester also knows how
# to read this file, ignoring the Tcl-isms.)
#
# Copyright (c) 1998, 1999 Henry Spencer.  All rights reserved.
#
# RCS: @(#) $Id: reg.test,v 1.25.2.1 2009/10/29 17:21:18 dgp Exp $

if {[lsearch [namespace children] ::tcltest] == -1} {
    package require tcltest 2
}

# All tests require the testregexp command, return if this
# command doesn't exist
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055


1056
1057
1058
1059


1060
1061
1062
1063
1064
1065
1066
} 1
test reg-33.8 {Bug 505048} {
    regexp -inline {\A\s*[^b]*b} ab
} ab
test reg-33.9 {Bug 505048} {
    regexp -indices -inline {\A\s*[^b]*b} ab
} {{0 1}}
test reg-33.10 {Bug 840258} {
    regsub {(^|\n)+\.*b} \n.b {} tmp
} 1


test reg-33.11 {Bug 840258} {
    regsub {(^|[\n\r]+)\.*\?<.*?(\n|\r)+} \
	    "TQ\r\n.?<5000267>Test already stopped\r\n" {} tmp
} 1


test reg-33.12 {Bug 1810264 - bad read} {
    regexp {\3161573148} {\3161573148}
} 0
test reg-33.13 {Bug 1810264 - infinite loop} {
    regexp {($|^)*} {x}
} 1
# Some environments have small default stack sizes. [Bug 1905562]







|

|
>
>
|


|
>
>







1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
} 1
test reg-33.8 {Bug 505048} {
    regexp -inline {\A\s*[^b]*b} ab
} ab
test reg-33.9 {Bug 505048} {
    regexp -indices -inline {\A\s*[^b]*b} ab
} {{0 1}}
test reg-33.10 {Bug 840258} -body {
    regsub {(^|\n)+\.*b} \n.b {} tmp
} -cleanup {
    unset tmp
} -result 1
test reg-33.11 {Bug 840258} -body {
    regsub {(^|[\n\r]+)\.*\?<.*?(\n|\r)+} \
	    "TQ\r\n.?<5000267>Test already stopped\r\n" {} tmp
} -cleanup {
    unset tmp
} -result 1
test reg-33.12 {Bug 1810264 - bad read} {
    regexp {\3161573148} {\3161573148}
} 0
test reg-33.13 {Bug 1810264 - infinite loop} {
    regexp {($|^)*} {x}
} 1
# Some environments have small default stack sizes. [Bug 1905562]