summaryrefslogtreecommitdiffstats
path: root/tests/place.test
diff options
context:
space:
mode:
authorculler <culler>2019-04-05 19:55:57 (GMT)
committerculler <culler>2019-04-05 19:55:57 (GMT)
commit081ca218bb45dcb50deb08f5674ed98c317f18b6 (patch)
treedc5c18612f61da4b945117828e40508bf3de2ae4 /tests/place.test
parentdb0089391e638dba6174fa80b2ab69a03cbce72b (diff)
downloadtk-081ca218bb45dcb50deb08f5674ed98c317f18b6.zip
tk-081ca218bb45dcb50deb08f5674ed98c317f18b6.tar.gz
tk-081ca218bb45dcb50deb08f5674ed98c317f18b6.tar.bz2
Fix bug [897ffea89f]: Tk allows management loops
Diffstat (limited to 'tests/place.test')
-rw-r--r--tests/place.test21
1 files changed, 20 insertions, 1 deletions
diff --git a/tests/place.test b/tests/place.test
index ddfa64c..62e0ed2 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -118,7 +118,26 @@ test place-4.4 {ConfigureSlave procedure, bad -in option} -setup {
} -body {
place .t.f2 -in .
} -returnCodes error -result {can't place .t.f2 relative to .}
-
+test place-4.5 {ConfigureSlave procedure, bad -in option} -setup {
+} -body {
+ frame .t.f1
+ place .t.f1 -in .t.f1
+} -returnCodes error -result {can't place .t.f1 relative to itself}
+test place-4.6 {prevent management loops} -setup {
+ place forget .t.f1
+} -body {
+ place .t.f1 -in .t.f2
+ place .t.f2 -in .t.f1
+} -returnCodes error -result {can't put .t.f2 inside .t.f1, would cause management loop}
+test place-4.7 {prevent management loops} -setup {
+ place forget .t.f1
+ place forget .t.f2
+} -body {
+ frame .t.f3
+ place .t.f1 -in .t.f2
+ place .t.f2 -in .t.f3
+ place .t.f3 -in .t.f1
+} -returnCodes error -result {can't put .t.f3 inside .t.f1, would cause management loop}
test place-5.1 {ConfigureSlave procedure, -relwidth option} -body {
place .t.f2 -relwidth abcd