summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorhobbs <hobbs>2000-05-08 22:04:16 (GMT)
committerhobbs <hobbs>2000-05-08 22:04:16 (GMT)
commitb1b2bcdcf6c7b763553901fdb1d5e112209f91f2 (patch)
treefa92370c5a8d1b29f59bf04885228dd5186d756d /tests
parent09f4c1de476f86324d54f2e8c31a66870ce1c8bc (diff)
downloadtcl-b1b2bcdcf6c7b763553901fdb1d5e112209f91f2.zip
tcl-b1b2bcdcf6c7b763553901fdb1d5e112209f91f2.tar.gz
tcl-b1b2bcdcf6c7b763553901fdb1d5e112209f91f2.tar.bz2
* tests/string.test: extended string match tests
Diffstat (limited to 'tests')
-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