diff options
author | rjohnson <rjohnson@noemail.net> | 1999-04-20 01:04:03 (GMT) |
---|---|---|
committer | rjohnson <rjohnson@noemail.net> | 1999-04-20 01:04:03 (GMT) |
commit | 79259544e656387be65d0e5ed3c869b0a8ddf38d (patch) | |
tree | 416bff1e332ea545060a9dd1c9776b740aed5e73 /tests/scale.test | |
parent | d1fd58487c0bfd40dc206fa03c2114976151e380 (diff) | |
download | tk-79259544e656387be65d0e5ed3c869b0a8ddf38d.zip tk-79259544e656387be65d0e5ed3c869b0a8ddf38d.tar.gz tk-79259544e656387be65d0e5ed3c869b0a8ddf38d.tar.bz2 |
Added new tests to scale and text.
Fixed core dump in text serach code: Bug 1642
FossilOrigin-Name: 9e52f3ffecf15cdcdacf2023f14b0beb21c47a9b
Diffstat (limited to 'tests/scale.test')
-rw-r--r-- | tests/scale.test | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/scale.test b/tests/scale.test index f52c050..b1941f5 100644 --- a/tests/scale.test +++ b/tests/scale.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scale.test,v 1.5 1999/04/19 23:54:57 hershey Exp $ +# RCS: @(#) $Id: scale.test,v 1.6 1999/04/20 01:04:04 rjohnson Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { source [file join [pwd] [file dirname [info script]] defs.tcl] @@ -92,8 +92,8 @@ foreach test { .s configure $name [lindex [.s configure $name] 3] incr i } - destroy .s + test scale-2.1 {Tk_ScaleCmd procedure} { list [catch {scale} msg] $msg } {1 {wrong # args: should be "scale pathName ?options?"}} @@ -796,6 +796,20 @@ test scale-16.1 {scale widget vs hidden commands} { list [winfo children .] [interp hidden] } [list {} $l] +test scale-17.1 {bug fix 1786} { + # Perhaps x is set to {}, depending on what other tests have run. + # If x is unset, or set to something not convertable to a double, + # then the scale try to initialize its value with the contents + # of uninitialized memory. Sometimes that causes an FPE. + + set x {} + scale .s -from 100 -to 300 + pack .s + update + .s configure -variable x ;# CRASH! -> Floating point exception + set x +} {} + catch {destroy .s} option clear |