summaryrefslogtreecommitdiffstats
path: root/tests/reg.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/reg.test')
-rw-r--r--tests/reg.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/reg.test b/tests/reg.test
index 8994fdc..2abe7b6 100644
--- a/tests/reg.test
+++ b/tests/reg.test
@@ -9,7 +9,7 @@
#
# Copyright (c) 1998, 1999 Henry Spencer. All rights reserved.
#
-# RCS: @(#) $Id: reg.test,v 1.16.2.3 2004/11/27 05:44:13 dgp Exp $
+# RCS: @(#) $Id: reg.test,v 1.16.2.4 2007/12/18 11:23:16 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -1130,6 +1130,19 @@ test reg-33.11 {Bug 840258} {
"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
+test reg-33.14 {Bug 1810264 - super-expensive expression} {
+ set start [clock seconds]
+ regexp {(x{200}){200}$y} {x}
+ set time [expr {[clock seconds] - $start}]
+ expr {$time < 5 ? "ok" : "Complex RE took $time seconds - bad!"}
+} ok
+
# cleanup
::tcltest::cleanupTests
return