diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/indexObj.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/indexObj.test b/tests/indexObj.test index ca58cc3..6df9082 100644 --- a/tests/indexObj.test +++ b/tests/indexObj.test @@ -8,7 +8,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: indexObj.test,v 1.10 2006/02/16 20:25:07 dgp Exp $ +# RCS: @(#) $Id: indexObj.test,v 1.11 2006/04/05 12:48:26 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -38,6 +38,12 @@ test indexObj-1.6 {forced exact match} testindexobj { test indexObj-1.7 {forced exact match} testindexobj { testindexobj 1 0 x abc def xalb xyz alm x } {5} +test indexObj-1.8 {exact match of empty values} testindexobj { + testindexobj 1 1 {} a aa aaa {} b bb bbb +} 3 +test indexObj-1.9 {exact match of empty values} testindexobj { + testindexobj 1 0 {} a aa aaa {} b bb bbb +} 3 test indexObj-2.1 {no match} testindexobj { list [catch {testindexobj 1 1 dddd abc def xalb xyz alm x} msg] $msg @@ -57,6 +63,12 @@ test indexObj-2.5 {omit error message} testindexobj { test indexObj-2.6 {TCL_EXACT => no "ambiguous" error message} { list [catch {testindexobj 1 0 d dumb daughter a c} msg] $msg } {1 {bad token "d": must be dumb, daughter, a, or c}} +test indexObj-2.7 {exact match of empty values} testindexobj { + list [catch {testindexobj 1 1 {} a b c} msg] $msg +} {1 {bad token "": must be a, b, or c}} +test indexObj-2.8 {exact match of empty values: singleton case} testindexobj { + list [catch {testindexobj 1 1 {} a} msg] $msg +} {1 {bad token "": must be a}} test indexObj-3.1 {cache result to skip next lookup} testindexobj { testindexobj check 42 @@ -114,3 +126,7 @@ test indexObj-6.4 {Tcl_GetIndexFromObjStruct} testindexobj { # cleanup ::tcltest::cleanupTests return + +# Local Variables: +# mode: tcl +# End: |