summaryrefslogtreecommitdiffstats
path: root/tests/regexp.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2017-02-18 16:24:09 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2017-02-18 16:24:09 (GMT)
commitfcf8e64d6b12e1682af90b9e25b364e22d04c7bf (patch)
treeb3f02f30b55376e1da06a9470a8624fb2c88f9ed /tests/regexp.test
parent768fa857c25a31f96cfdfeeb34e8628f68ddb7ba (diff)
downloadtcl-fcf8e64d6b12e1682af90b9e25b364e22d04c7bf.zip
tcl-fcf8e64d6b12e1682af90b9e25b364e22d04c7bf.tar.gz
tcl-fcf8e64d6b12e1682af90b9e25b364e22d04c7bf.tar.bz2
Testing for some error cases.
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index f1be6eb..2686526 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -1178,6 +1178,12 @@ test regexp-27.9 {regsub -command memory leak testing} memory {
regsub -command -all {\d+} $::s $::t
}
} 0
+test regexp-27.10 {regsub -command error cases} -returnCodes error -body {
+ regsub -command . abc "def \{ghi"
+} -result {unmatched open brace in list}
+test regexp-27.11 {regsub -command error cases} -returnCodes error -body {
+ regsub -command . abc {}
+} -result {command prefix must be a list of at least one element}
# cleanup
::tcltest::cleanupTests