diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-09-16 08:12:48 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2011-09-16 08:12:48 (GMT) |
commit | 679c72e5a2c14ab53b227e058c4ef06edde6b7a4 (patch) | |
tree | b28a3a30c684e4377f39e18d3b4689891cab876b /tests/binary.test | |
parent | fe0e5c84250f9e45fcbf320d121a961c767b3b5a (diff) | |
parent | ef09f86d39a751b46143aa33f2ee808b31a6a984 (diff) | |
download | tcl-679c72e5a2c14ab53b227e058c4ef06edde6b7a4.zip tcl-679c72e5a2c14ab53b227e058c4ef06edde6b7a4.tar.gz tcl-679c72e5a2c14ab53b227e058c4ef06edde6b7a4.tar.bz2 |
merge trunk to feature branchtip_388_impl
Diffstat (limited to 'tests/binary.test')
-rw-r--r-- | tests/binary.test | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/binary.test b/tests/binary.test index 8b2880b..6c00508 100644 --- a/tests/binary.test +++ b/tests/binary.test @@ -2381,6 +2381,23 @@ test binary-63.4 {NaN} ieeeFloatingPoint { format 0x%016lx [expr {$w & 0xfff3ffffffffffff}] } 0x7ff3123456789abc +# Make sure TclParseNumber() rejects invalid nan-hex formats [Bug 3402540] +test binary-63.5 {NaN} -constraints ieeeFloatingPoint -body { + binary format q Nan( +} -returnCodes error -match glob -result {expected floating-point number*} +test binary-63.6 {NaN} -constraints ieeeFloatingPoint -body { + binary format q Nan() +} -returnCodes error -match glob -result {expected floating-point number*} +test binary-63.7 {NaN} -constraints ieeeFloatingPoint -body { + binary format q Nan(g) +} -returnCodes error -match glob -result {expected floating-point number*} +test binary-63.8 {NaN} -constraints ieeeFloatingPoint -body { + binary format q Nan(1,2) +} -returnCodes error -match glob -result {expected floating-point number*} +test binary-63.9 {NaN} -constraints ieeeFloatingPoint -body { + binary format q Nan(1234567890abcd) +} -returnCodes error -match glob -result {expected floating-point number*} + test binary-64.1 {NaN} -constraints ieeeFloatingPoint -body { binary scan [binary format w 0x7ff8000000000000] q d set d |