diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/grid.test | 10 | ||||
-rw-r--r-- | tests/pack.test | 8 | ||||
-rw-r--r-- | tests/place.test | 8 |
3 files changed, 23 insertions, 3 deletions
diff --git a/tests/grid.test b/tests/grid.test index c47348e..47f99c0 100644 --- a/tests/grid.test +++ b/tests/grid.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: grid.test,v 1.17 2002/10/10 21:07:52 pspjuth Exp $ +# RCS: @(#) $Id: grid.test,v 1.18 2003/03/12 00:09:37 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -946,6 +946,14 @@ test grid-13.1 {-in} { } {1 {Window can't be managed in itself}} grid_reset 13.1 +test grid-13.1.1 {-in} { + frame .f -bg red + list [winfo manager .f] \ + [catch {grid .f -in .f} err] $err \ + [winfo manager .f] +} {{} 1 {Window can't be managed in itself} {}} +grid_reset 13.1.1 + test grid-13.2 {-in} { frame .f -bg red list [catch "grid .f -in .bad" msg] $msg diff --git a/tests/pack.test b/tests/pack.test index 488281a..c4af29f 100644 --- a/tests/pack.test +++ b/tests/pack.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: pack.test,v 1.10 2002/07/13 20:28:35 dgp Exp $ +# RCS: @(#) $Id: pack.test,v 1.11 2003/03/12 00:09:40 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -615,6 +615,12 @@ test pack-10.2 {retaining/clearing configuration state} { pack .pack.a -pady 14 pack info .pack.a } {-in .pack -anchor n -expand 1 -fill both -ipadx 3 -ipady 4 -padx 1 -pady 14 -side bottom} +test pack-10.3 {bad -in window does not change master} { + pack forget .pack.a .pack.b .pack.c .pack.d + list [winfo manager .pack.a] \ + [catch {pack .pack.a -in .pack.a} err] $err \ + [winfo manager .pack.a] +} {{} 1 {can't pack .pack.a inside itself} {}} test pack-11.1 {info option} { pack4 -in .pack diff --git a/tests/place.test b/tests/place.test index 4bf47fb..10e45b7 100644 --- a/tests/place.test +++ b/tests/place.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: place.test,v 1.8 2002/11/07 19:10:30 pspjuth Exp $ +# RCS: @(#) $Id: place.test,v 1.9 2003/03/12 00:09:40 mdejong Exp $ package require tcltest 2.1 namespace import -force tcltest::configure @@ -87,6 +87,12 @@ test place-4.1 {ConfigureSlave procedure, bad -in options} { } [list 1 "can't place .t.f2 relative to itself"] test place-4.2 {ConfigureSlave procedure, bad -in option} { place forget .t.f2 + list [winfo manager .t.f2] \ + [catch {place .t.f2 -in .t.f2} err] $err \ + [winfo manager .t.f2] +} {{} 1 {can't place .t.f2 relative to itself} {}} +test place-4.3 {ConfigureSlave procedure, bad -in option} { + place forget .t.f2 list [catch {place .t.f2 -in .} msg] $msg } [list 1 "can't place .t.f2 relative to ."] |