diff options
author | fvogel <fvogelnew1@free.fr> | 2018-10-11 19:57:44 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2018-10-11 19:57:44 (GMT) |
commit | 114e0f85da55b2dfb11407cf23d13d16c4567ebd (patch) | |
tree | 55df4761af92cb2069212be8ffefda692c4f5783 /tests | |
parent | b0abd430cd2f3ea766e6c868df62b4db58635a44 (diff) | |
download | tk-114e0f85da55b2dfb11407cf23d13d16c4567ebd.zip tk-114e0f85da55b2dfb11407cf23d13d16c4567ebd.tar.gz tk-114e0f85da55b2dfb11407cf23d13d16c4567ebd.tar.bz2 |
Add non regression test cases for [4b555aca34]: text search -all hangs and eats all memory
Diffstat (limited to 'tests')
-rw-r--r-- | tests/text.test | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/text.test b/tests/text.test index c656446..6dc6999 100644 --- a/tests/text.test +++ b/tests/text.test @@ -5873,6 +5873,32 @@ test text-22.225 {TextSearchCmd, strict limits} -body { } -cleanup { destroy .t } -result {} +test text-22.226 {TextSearchCmd, search for the empty string} -body { + pack [text .t] + .t search "" 1.0 +} -cleanup { + destroy .t +} -result {1.0} +test text-22.227 {TextSearchCmd, search for the empty string} -body { + pack [text .t] + .t insert end "Searching for the\nempty string!" + .t search "" 2.5 +} -cleanup { + destroy .t +} -result {2.5} +test text-22.228 {TextSearchCmd, search all empty strings} -body { + pack [text .t] + .t search -all "" 1.0 +} -cleanup { + destroy .t +} -result {1.0} +test text-22.228 {TextSearchCmd, search all empty strings} -body { + pack [text .t] + .t insert end "Searching for the\nempty string!" + .t search -all "" 2.5 +} -cleanup { + destroy .t +} -result {2.5} test text-23.1 {TkTextGetTabs procedure} -setup { |