summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-10-14 18:21:59 (GMT)
committervincentdarley <vincentdarley>2003-10-14 18:21:59 (GMT)
commit0281176be42fbf8cd519c17208041ba5fcf8b193 (patch)
tree23e080c3df14c525a9db3c578e15e105fb1816c1 /tests/regexp.test
parentc18947675711693a12a4d8f933281f357bbab984 (diff)
downloadtcl-0281176be42fbf8cd519c17208041ba5fcf8b193.zip
tcl-0281176be42fbf8cd519c17208041ba5fcf8b193.tar.gz
tcl-0281176be42fbf8cd519c17208041ba5fcf8b193.tar.bz2
regsub fix
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 08ec147..1403e9d 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.2 2003/10/07 04:48:07 dgp Exp $
+# RCS: @(#) $Id: regexp.test,v 1.22.2.3 2003/10/14 18:22:10 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -616,6 +616,18 @@ test regexp-21.10 {multiple matches handle newlines} {
regsub -all -lineanchor -- {^#[^\n]*\n} "#one\n#two\n#three\n" foo\n
} "foo\nfoo\nfoo\n"
+test regexp-21.11 {multiple matches handle newlines} {
+ regsub -all -line -- ^ "a\nb\nc" \#
+} "\#a\n\#b\n\#c"
+
+test regexp-21.12 {multiple matches handle newlines} {
+ regsub -all -line -- ^ "\n\n" \#
+} "\#\n\#\n\#"
+
+test regexp-21.13 {multiple matches handle newlines} {
+ regexp -all -inline -indices -line -- ^ "a\nb\nc"
+} {{0 -1} {2 1} {4 3}}
+
# cleanup
::tcltest::cleanupTests
return