diff options
author | culler <culler> | 2020-11-10 13:59:25 (GMT) |
---|---|---|
committer | culler <culler> | 2020-11-10 13:59:25 (GMT) |
commit | d94200fdcf927707b43670e7751208ea902b382e (patch) | |
tree | c8f724ce055955eef67c4b799866138c5389715d /tests/oldpack.test | |
parent | a49d6e52a72b1f086503ae32cb28b0da62e5fa99 (diff) | |
parent | 6133a711414cfb8fcc3a8b52ecf25b59a09e5800 (diff) | |
download | tk-d94200fdcf927707b43670e7751208ea902b382e.zip tk-d94200fdcf927707b43670e7751208ea902b382e.tar.gz tk-d94200fdcf927707b43670e7751208ea902b382e.tar.bz2 |
Merge main
Diffstat (limited to 'tests/oldpack.test')
-rw-r--r-- | tests/oldpack.test | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/tests/oldpack.test b/tests/oldpack.test index 72ec065..68a56a0 100644 --- a/tests/oldpack.test +++ b/tests/oldpack.test @@ -2,9 +2,9 @@ # "pack" command (before release 3.3). It is organized in the # standard fashion for Tcl tests. # -# Copyright (c) 1991-1994 The Regents of the University of California. -# Copyright (c) 1994 Sun Microsystems, Inc. -# Copyright (c) 1998-1999 by Scriptics Corporation. +# Copyright © 1991-1994 The Regents of the University of California. +# Copyright © 1994 Sun Microsystems, Inc. +# Copyright © 1998-1999 by Scriptics Corporation. # All rights reserved. package require tcltest 2.2 @@ -30,8 +30,13 @@ frame .pack.violet -width 80 -height 20 label .pack.violet.l -text P -bd 2 -relief raised place .pack.violet.l -relwidth 1.0 -relheight 1.0 +if {![catch {pack ap .pack .pack.red top}]} { + +# Don't execute any of this file if Tk is compiled with -DTCL_NO_DEPRECATED + + test oldpack-1.1 {basic positioning} -body { - pack ap .pack .pack.red top + #pack ap .pack .pack.red top update winfo geometry .pack.red } -result 10x20+45+0 @@ -452,10 +457,10 @@ test oldpack-8.2 {syntax errors} -body { } -returnCodes error -result {wrong # args: should be "pack option arg ?arg ...?"} test oldpack-8.3 {syntax errors} -body { pack gorp foo -} -returnCodes error -result {bad option "gorp": must be configure, forget, info, propagate, or slaves} +} -returnCodes error -result {bad option "gorp": must be configure, content, forget, info, or propagate} test oldpack-8.4 {syntax errors} -body { pack a .pack -} -returnCodes error -result {bad option "a": must be configure, forget, info, propagate, or slaves} +} -returnCodes error -result {bad option "a": must be configure, content, forget, info, or propagate} test oldpack-8.5 {syntax errors} -body { pack after foobar } -returnCodes error -result {bad window path name "foobar"} @@ -492,7 +497,7 @@ test oldpack-8.12 {syntax errors} -body { } -returnCodes error -result {wrong # args: window ".pack.blue" should be followed by options} test oldpack-8.13 {syntax errors} -body { pack append . .pack.blue top -} -returnCodes error -result {can't pack .pack.blue inside .} +} -returnCodes error -result {can't pack ".pack.blue" inside "."} test oldpack-8.14 {syntax errors} -body { pack append .pack .pack.blue f } -returnCodes error -result {bad option "f": should be top, bottom, left, right, expand, fill, fillx, filly, padx, pady, or frame} @@ -527,23 +532,24 @@ test oldpack-9.1 {information output} -body { pack append .pack .pack.blue {top fillx frame n} \ .pack.red {bottom filly frame s} .pack.green {left fill frame w} \ .pack.violet {right expand frame e} - list [pack slaves .pack] [pack info .pack.blue] [pack info .pack.red] \ + list [pack content .pack] [pack info .pack.blue] [pack info .pack.red] \ [pack info .pack.green] [pack info .pack.violet] } -result {{.pack.blue .pack.red .pack.green .pack.violet} {-in .pack -anchor n -expand 0 -fill x -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top} {-in .pack -anchor s -expand 0 -fill y -ipadx 0 -ipady 0 -padx 0 -pady 0 -side bottom} {-in .pack -anchor w -expand 0 -fill both -ipadx 0 -ipady 0 -padx 0 -pady 0 -side left} {-in .pack -anchor e -expand 1 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side right}} test oldpack-9.2 {information output} -body { pack append .pack .pack.blue {padx 10 frame nw} \ .pack.red {pady 20 frame ne} .pack.green {frame se} \ .pack.violet {frame sw} - list [pack slaves .pack] [pack info .pack.blue] [pack info .pack.red] \ + list [pack content .pack] [pack info .pack.blue] [pack info .pack.red] \ [pack info .pack.green] [pack info .pack.violet] } -result {{.pack.blue .pack.red .pack.green .pack.violet} {-in .pack -anchor nw -expand 0 -fill none -ipadx 0 -ipady 0 -padx 5 -pady 0 -side top} {-in .pack -anchor ne -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 10 -side top} {-in .pack -anchor se -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top} {-in .pack -anchor sw -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top}} test oldpack-9.3 {information output} -body { pack append .pack .pack.blue {frame center} .pack.red {frame center} \ .pack.green {frame c} .pack.violet {frame c} - list [pack slaves .pack] [pack info .pack.blue] [pack info .pack.red] \ + list [pack content .pack] [pack info .pack.blue] [pack info .pack.red] \ [pack info .pack.green] [pack info .pack.violet] } -result {{.pack.blue .pack.red .pack.green .pack.violet} {-in .pack -anchor center -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top} {-in .pack -anchor center -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top} {-in .pack -anchor center -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top} {-in .pack -anchor center -expand 0 -fill none -ipadx 0 -ipady 0 -padx 0 -pady 0 -side top}} +} destroy .pack # cleanup |