diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-08 21:10:33 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-10-08 21:10:33 (GMT) |
commit | e1e6afc8e8df91158a72b2f9cdbe132b5f2a6f5a (patch) | |
tree | e8c87fd52c9b491ee64a9079303406a1f5b100e8 /tests/expr.test | |
parent | 188cbbf97a74ee64a4df069443432ef1d9255a29 (diff) | |
download | tcl-e1e6afc8e8df91158a72b2f9cdbe132b5f2a6f5a.zip tcl-e1e6afc8e8df91158a72b2f9cdbe132b5f2a6f5a.tar.gz tcl-e1e6afc8e8df91158a72b2f9cdbe132b5f2a6f5a.tar.bz2 |
Basic tests for TIPs #201 and #212
Diffstat (limited to 'tests/expr.test')
-rw-r--r-- | tests/expr.test | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test index 4cc644e..9e70447 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: expr.test,v 1.28 2004/10/04 13:56:37 dkf Exp $ +# RCS: @(#) $Id: expr.test,v 1.29 2004/10/08 21:10:36 dkf Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -875,6 +875,23 @@ test expr-24.7 {expr edge cases; shifting} {expr wide(5)<<32} 21474836480 test expr-24.8 {expr edge cases; shifting} {expr wide(10)<<63} 0 test expr-24.9 {expr edge cases; shifting} {expr 5>>32} 0 +# List membership tests +test expr-25.1 {'in' operator} {expr {"a" in "a b c"}} 1 +test expr-25.2 {'in' operator} {expr {"a" in "b a c"}} 1 +test expr-25.3 {'in' operator} {expr {"a" in "b c a"}} 1 +test expr-25.4 {'in' operator} {expr {"a" in ""}} 0 +test expr-25.5 {'in' operator} {expr {"" in {a b c ""}}} 1 +test expr-25.6 {'in' operator} {expr {"" in "a b c"}} 0 +test expr-25.7 {'in' operator} {expr {"" in ""}} 0 + +test expr-26.1 {'ni' operator} {expr {"a" ni "a b c"}} 0 +test expr-26.2 {'ni' operator} {expr {"a" ni "b a c"}} 0 +test expr-26.3 {'ni' operator} {expr {"a" ni "b c a"}} 0 +test expr-26.4 {'ni' operator} {expr {"a" ni ""}} 1 +test expr-26.5 {'ni' operator} {expr {"" ni {a b c ""}}} 0 +test expr-26.6 {'ni' operator} {expr {"" ni "a b c"}} 1 +test expr-26.7 {'ni' operator} {expr {"" ni ""}} 1 + # cleanup if {[info exists a]} { unset a |