summaryrefslogtreecommitdiffstats
path: root/tests/expr.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2000-11-24 15:14:01 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2000-11-24 15:14:01 (GMT)
commit4cf6a38e55fbdf502fcbb4d15c8ad94e4f891e6d (patch)
treedb89bafd04357d6b81424148757197e45e8ca480 /tests/expr.test
parent64e7ffd3fab4c089f88c5be39ec49f3ffae0dac4 (diff)
downloadtcl-4cf6a38e55fbdf502fcbb4d15c8ad94e4f891e6d.zip
tcl-4cf6a38e55fbdf502fcbb4d15c8ad94e4f891e6d.tar.gz
tcl-4cf6a38e55fbdf502fcbb4d15c8ad94e4f891e6d.tar.bz2
Added test to detect bug #119153; the string forms of boolean values
should not be second-class citizens in the Tcl world...
Diffstat (limited to 'tests/expr.test')
-rw-r--r--tests/expr.test7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/expr.test b/tests/expr.test
index 9ea5026..05b8f9d 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.10 2000/05/09 00:00:37 hobbs Exp $
+# RCS: @(#) $Id: expr.test,v 1.11 2000/11/24 15:14:01 dkf Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -466,6 +466,11 @@ test expr-13.16 {CompileUnaryExpr: error in primary expr} {
catch {expr [set]} msg
set msg
} {wrong # args: should be "set varName ?newValue?"}
+test expr-13.17 {CompileUnaryExpr: negating non-numeric boolean literals} {
+ set a1 yes; set a0 no; set b1 true; set b0 false
+ list [expr {!$a1}] [expr {!$a0}] [expr {!$b1}] [expr {!$b0}]
+} {0 1 0 1}
+
test expr-14.1 {CompilePrimaryExpr: literal primary} {expr 1} 1
test expr-14.2 {CompilePrimaryExpr: literal primary} {expr 123} 123
test expr-14.3 {CompilePrimaryExpr: literal primary} {expr 0xff} 255