summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2003-10-14 18:23:31 (GMT)
committervincentdarley <vincentdarley>2003-10-14 18:23:31 (GMT)
commitdd08d357ebf5c18a2de038e6600bc9a1f6436be5 (patch)
treecc1475b28f0953253a92d4e9d00491b37ef39888 /tests/regexp.test
parentb7c8b125de1f42a74d05bd5882afc2da0a88604a (diff)
downloadtcl-dd08d357ebf5c18a2de038e6600bc9a1f6436be5.zip
tcl-dd08d357ebf5c18a2de038e6600bc9a1f6436be5.tar.gz
tcl-dd08d357ebf5c18a2de038e6600bc9a1f6436be5.tar.bz2
regsub fix
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 86ee8c8..fe4221b 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.24 2003/10/07 04:48:38 dgp Exp $
+# RCS: @(#) $Id: regexp.test,v 1.25 2003/10/14 18:23:31 vincentdarley Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -616,6 +616,19 @@ 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