summaryrefslogtreecommitdiff
path: root/tests/regexp.test
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2019-11-20 20:30:03 +0100
committerDidier Raboud <odyx@debian.org>2019-11-20 20:30:03 +0100
commitb0aeaea912817dd53fda33331a8f6e562b695a50 (patch)
tree4c3eca617f759c0bc9698cc35c599ef3113fa706 /tests/regexp.test
parent68b3a623cde64e8dd53f8b1929a7cc9eabf0dadd (diff)
parent052cee686ea886c16b59dcabb5a04b2e6d390ade (diff)
Update to upstream 0.79+dfsg0
[git-debrebase anchor: new upstream 0.79+dfsg0, merge]
Diffstat (limited to 'tests/regexp.test')
-rw-r--r--tests/regexp.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regexp.test b/tests/regexp.test
index 94107eb..2e9b13e 100644
--- a/tests/regexp.test
+++ b/tests/regexp.test
@@ -222,6 +222,10 @@ test regexp-6.8 {regexp errors} jim {
test regexp-6.9 {regexp errors, -start bad int check} {
list [catch {regexp -start bogus {^$} {}} msg] $msg
} {1 {bad index "bogus": must be integer?[+-]integer? or end?[+-]integer?}}
+test regexp-6.10 {regexp errors, -start too few args} {
+ list [catch {regexp -all -start} msg] $msg
+} {1 {wrong # args: should be "regexp ?-switch ...? exp string ?matchVar? ?subMatchVar ...?"}}
+
test regexp-7.1 {basic regsub operation} {
list [regsub aa+ xaxaaaxaa 111&222 foo] $foo
@@ -388,6 +392,10 @@ test regexp-11.11 {regsub without final variable name returns value} {
test regexp-11.12 {regsub without final variable name returns value} {
regsub -all b(\[^d\]*)d abcdeabcfde {,&,\1,}
} {a,bcd,c,ea,bcfd,cf,e}
+test regexp-11.13 {regsub errors, -start too few args} {
+ list [catch {regsub -all -nocase -nocase -start} msg] $msg
+} {1 {wrong # args: should be "regsub ?-switch ...? exp string subSpec ?varName?"}}
+
# This test crashes on the Mac unless you increase the Stack Space to about 1
# Meg. This is probably bigger than most users want...