summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2007-11-15 22:01:03 (GMT)
committerdgp <dgp@users.sourceforge.net>2007-11-15 22:01:03 (GMT)
commitcdb09f0ded89acc8b7a6b269f50fc8cd15da9739 (patch)
treed9b1b39a8a0517ecc9bbd810273e0cb13e7ca980 /tests/regexp.test
parenta4ad9e9083662f62f8f3df8f9901a114be5cbf24 (diff)
downloadtcl-cdb09f0ded89acc8b7a6b269f50fc8cd15da9739.zip
tcl-cdb09f0ded89acc8b7a6b269f50fc8cd15da9739.tar.gz
tcl-cdb09f0ded89acc8b7a6b269f50fc8cd15da9739.tar.bz2
* generic/regc_nfa.c: Fixed infinite loop in the regexp compiler
* generic/regcomp.c: [Bug 1810038]. Corrected looping logic in * tests/regexp.test: fixempties() to avoid wasting time walking a list of dead states [Bug 1832612]. Convert optst() from expensive no-op to a cheap no-op. Improve newline usage in debug output.
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 1403e9d..c4c1c80 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.22.2.3 2003/10/14 18:22:10 vincentdarley Exp $
+# RCS: @(#) $Id: regexp.test,v 1.22.2.4 2007/11/15 22:01:10 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -628,6 +628,12 @@ test regexp-21.13 {multiple matches handle newlines} {
regexp -all -inline -indices -line -- ^ "a\nb\nc"
} {{0 -1} {2 1} {4 3}}
+
+test regexp-22.1 {Bug 1810038} {
+ regexp ($|^X)* {}
+} 1
+
+
# cleanup
::tcltest::cleanupTests
return