diff options
author | hobbs <hobbs> | 2007-12-23 21:29:40 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2007-12-23 21:29:40 (GMT) |
commit | f98c90831ad984d50a60f541c50fd3b85c05a6e6 (patch) | |
tree | 90b1e3cd3e2b5290c96cf7533067296260067ca9 /tests | |
parent | f762a775b0f50b12a52f497f0cc0078e0be159f5 (diff) | |
download | tcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.zip tcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.tar.gz tcl-f98c90831ad984d50a60f541c50fd3b85c05a6e6.tar.bz2 |
* generic/tclCompCmds.c (TclCompileRegexpCmd): TCL_REG_NOSUB cannot
* tests/regexp.test (regexp-22.2): be used because it
* tests/regexpComp.test: [Bug 1857126] disallows backrefs.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/regexp.test | 5 | ||||
-rw-r--r-- | tests/regexpComp.test | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test index 5471ca5..92b6c6a 100644 --- a/tests/regexp.test +++ b/tests/regexp.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: regexp.test,v 1.29 2007/12/13 15:26:07 dgp Exp $ +# RCS: @(#) $Id: regexp.test,v 1.30 2007/12/23 21:29:42 hobbs Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -659,6 +659,9 @@ test regexp-22.1 {Bug 1810038} { regexp ($|^X)* {} } 1 +test regexp-22.2 {regexp compile and backrefs, Bug 1857126} { + regexp -- {([bc])\1} bb +} 1 # cleanup ::tcltest::cleanupTests diff --git a/tests/regexpComp.test b/tests/regexpComp.test index 8460006..c104a69 100644 --- a/tests/regexpComp.test +++ b/tests/regexpComp.test @@ -802,6 +802,18 @@ test regexpComp-21.11 {regexp command compiling tests} { } } {0 {}} +test regexpComp-22.1 {Bug 1810038} { + evalInProc { + regexp ($|^X)* {} + } +} 1 + +test regexpComp-22.2 {regexp compile and backrefs, Bug 1857126} { + evalInProc { + regexp -- {([bc])\1} bb + } +} 1 + set i 0 foreach {str exp result} { foo ^foo 1 |