diff options
Diffstat (limited to 'tests/expr.test')
| -rw-r--r-- | tests/expr.test | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/expr.test b/tests/expr.test index bd6d2b4..6ad7208 100644 --- a/tests/expr.test +++ b/tests/expr.test @@ -9,14 +9,15 @@ # # 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.72.2.4 2010/02/21 20:27:50 nijtmans Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2.1 namespace import -force ::tcltest::* } +::tcltest::loadTestedCommands +catch [list package require -exact Tcltest [info patchlevel]] + testConstraint testmathfunctions [expr { ([catch {expr T1()} msg] != 1) || ($msg ne {invalid command name "tcl::mathfunc::T1"}) }] @@ -355,10 +356,7 @@ test expr-8.11 {CompileEqualityExpr: error compiling equality arm} -body { expr 2!=x } -returnCodes error -match glob -result * test expr-8.12 {CompileBitAndExpr: equality expr} {expr {"a"eq"a"}} 1 -test expr-8.13 {CompileBitAndExpr: equality expr} { - set s \u00fc - expr {"\374" eq $s} -} 1 +test expr-8.13 {CompileBitAndExpr: equality expr} {expr {"\374" eq [set s \u00fc]}} 1 test expr-8.14 {CompileBitAndExpr: equality expr} {expr 3eq2} 0 test expr-8.15 {CompileBitAndExpr: equality expr} {expr 2.0eq2} 0 test expr-8.16 {CompileBitAndExpr: equality expr} {expr 3.2ne2.2} 1 @@ -7167,6 +7165,17 @@ test expr-48.1 {Bug 1770224} { expr {-0x8000000000000001 >> 0x8000000000000000} } -1 +test expr-49.1 {Bug 2823282} { + coroutine foo apply {{} {set expr expr; $expr {[yield]}}} + foo 1 +} 1 + +test expr-50.1 {test sqrt() of bignums with non-Inf answer} { + expr {sqrt("1[string repeat 0 616]") == 1e308} +} 1 + + + # cleanup if {[info exists a]} { unset a |
