summaryrefslogtreecommitdiffstats
path: root/tests/string.test
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2000-05-08 22:04:16 (GMT)
committerhobbs <hobbs@noemail.net>2000-05-08 22:04:16 (GMT)
commita24a1dd606f07547aa98864dedb4ade18de1f1bf (patch)
treefa92370c5a8d1b29f59bf04885228dd5186d756d /tests/string.test
parent6688b24cf2b7dfcaf80cd6658b713e66ec598536 (diff)
downloadtcl-a24a1dd606f07547aa98864dedb4ade18de1f1bf.zip
tcl-a24a1dd606f07547aa98864dedb4ade18de1f1bf.tar.gz
tcl-a24a1dd606f07547aa98864dedb4ade18de1f1bf.tar.bz2
* tests/string.test: extended string match tests
FossilOrigin-Name: 287915a2fea42c114cbd142f79b1e3141bc20372
Diffstat (limited to 'tests/string.test')
-rw-r--r--tests/string.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test
index 0de9388..0a7e1c1 100644
--- a/tests/string.test
+++ b/tests/string.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: string.test,v 1.23 2000/04/10 17:19:04 ericm Exp $
+# RCS: @(#) $Id: string.test,v 1.24 2000/05/08 22:04:16 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -798,6 +798,39 @@ test string-11.37 {string match nocase} {
test string-11.38 {string match case, reverse range} {
string match {[A-fh-Z]} g
} 1
+test string-11.39 {string match, *\ case} {
+ string match {*\abc} abc
+} 1
+test string-11.40 {string match, *special case} {
+ string match {*[ab]} abc
+} 0
+test string-11.41 {string match, *special case} {
+ string match {*[ab]*} abc
+} 1
+test string-11.42 {string match, *special case} {
+ string match "*\\" "\\"
+} 0
+test string-11.43 {string match, *special case} {
+ string match "*\\\\" "\\"
+} 1
+test string-11.44 {string match, *special case} {
+ string match "*???" "12345"
+} 1
+test string-11.45 {string match, *special case} {
+ string match "*???" "12"
+} 0
+test string-11.46 {string match, *special case} {
+ string match "*\\*" "abc*"
+} 1
+test string-11.47 {string match, *special case} {
+ string match "*\\*" "*"
+} 1
+test string-11.47 {string match, *special case} {
+ string match "*\\*" "*abc"
+} 0
+test string-11.48 {string match, *special case} {
+ string match "?\\*" "a*"
+} 1
test string-12.1 {string range} {
list [catch {string range} msg] $msg