diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-20 10:23:13 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-11-20 10:23:13 (GMT) |
commit | 75a121d773012cc6cd212b1e0b23a156399e2cd5 (patch) | |
tree | e782790f9b0385d0f50f6c80a170031deb9cef55 /tests | |
parent | adc8a8bbdfc5a2db405f03a4c2af2adfa5d0f250 (diff) | |
parent | bc3e198cba9e40c015a6acfa992c69434274dde6 (diff) | |
download | tcl-75a121d773012cc6cd212b1e0b23a156399e2cd5.zip tcl-75a121d773012cc6cd212b1e0b23a156399e2cd5.tar.gz tcl-75a121d773012cc6cd212b1e0b23a156399e2cd5.tar.bz2 |
merge core-8-branch
Diffstat (limited to 'tests')
-rw-r--r-- | tests/expr-old.test | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tests/expr-old.test b/tests/expr-old.test index 54191b6..aefeb8f 100644 --- a/tests/expr-old.test +++ b/tests/expr-old.test @@ -1159,8 +1159,8 @@ test expr-old-40.2 {min math function} -body { expr {min(0.0)} } -result 0.0 test expr-old-40.3 {min math function} -body { - list [catch {expr {min()}} msg] $msg -} -result {1 {too few arguments to math function "min"}} + expr {min()} +} -returnCodes error -result {too few arguments for math function "min"} test expr-old-40.4 {min math function} -body { expr {min(wide(-1) << 30, 4.5, -10)} } -result [expr {wide(-1) << 30}] @@ -1170,6 +1170,12 @@ test expr-old-40.5 {min math function} -body { test expr-old-40.6 {min math function} -body { expr {min(300, "0xFF")} } -result 255 +test expr-old-40.7 {min math function} -body { + expr min(1[string repeat 0 10000], 1e300) +} -result 1e+300 +test expr-old-40.8 {min math function} -body { + expr {min(0, "a")} +} -returnCodes error -match glob -result * test expr-old-41.1 {max math function} -body { expr {max(0)} @@ -1178,8 +1184,8 @@ test expr-old-41.2 {max math function} -body { expr {max(0.0)} } -result 0.0 test expr-old-41.3 {max math function} -body { - list [catch {expr {max()}} msg] $msg -} -result {1 {too few arguments to math function "max"}} + expr {max()} +} -returnCodes error -result {too few arguments for math function "max"} test expr-old-41.4 {max math function} -body { expr {max(wide(1) << 30, 4.5, -10)} } -result [expr {wide(1) << 30}] @@ -1189,6 +1195,12 @@ test expr-old-41.5 {max math function} -body { test expr-old-41.6 {max math function} -body { expr {max(200, "0xFF")} } -result 255 +test expr-old-41.7 {max math function} -body { + expr max(1[string repeat 0 10000], 1e300) +} -result 1[string repeat 0 10000] +test expr-old-41.8 {max math function} -body { + expr {max(0, "a")} +} -returnCodes error -match glob -result * # Special test for Pentium arithmetic bug of 1994: |