diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/string.test | 50 |
1 files changed, 49 insertions, 1 deletions
diff --git a/tests/string.test b/tests/string.test index 02555a4..2cfd78a 100644 --- a/tests/string.test +++ b/tests/string.test @@ -12,7 +12,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.49 2005/05/12 22:48:17 dgp Exp $ +# RCS: @(#) $Id: string.test,v 1.50 2005/07/23 02:59:59 mdejong Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -1422,6 +1422,54 @@ test string-23.0 {string is boolean, Bug 1187123} testindexobj { string is boolean $x } 0 +test string-23.1 {string is command with empty string} { + set s "" + list \ + [string is alnum $s] \ + [string is alpha $s] \ + [string is ascii $s] \ + [string is control $s] \ + [string is boolean $s] \ + [string is digit $s] \ + [string is double $s] \ + [string is false $s] \ + [string is graph $s] \ + [string is integer $s] \ + [string is lower $s] \ + [string is print $s] \ + [string is punct $s] \ + [string is space $s] \ + [string is true $s] \ + [string is upper $s] \ + [string is wordchar $s] \ + [string is xdigit $s] \ + +} {1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1} + +test string-23.2 {string is command with empty string} { + set s "" + list \ + [string is alnum -strict $s] \ + [string is alpha -strict $s] \ + [string is ascii -strict $s] \ + [string is control -strict $s] \ + [string is boolean -strict $s] \ + [string is digit -strict $s] \ + [string is double -strict $s] \ + [string is false -strict $s] \ + [string is graph -strict $s] \ + [string is integer -strict $s] \ + [string is lower -strict $s] \ + [string is print -strict $s] \ + [string is punct -strict $s] \ + [string is space -strict $s] \ + [string is true -strict $s] \ + [string is upper -strict $s] \ + [string is wordchar -strict $s] \ + [string is xdigit -strict $s] \ + +} {0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0} + # cleanup ::tcltest::cleanupTests return |