From 7c820a9ae19502e7f5d59f4310c33bfeb64bf9ba Mon Sep 17 00:00:00 2001 From: dkf Date: Sun, 23 May 2004 17:34:48 +0000 Subject: First step towards improving test style. Also start using Tcl 8.5 features. --- ChangeLog | 3 + tests/bell.test | 15 +- tests/bgerror.test | 15 +- tests/bind.test | 577 +++++++++++++++++++++++++------------------------ tests/bitmap.test | 15 +- tests/border.test | 15 +- tests/button.test | 52 +++-- tests/canvImg.test | 62 ++---- tests/canvPs.test | 15 +- tests/canvRect.test | 46 ++-- tests/canvText.test | 31 +-- tests/canvWind.test | 15 +- tests/canvas.test | 45 ++-- tests/choosedir.test | 4 +- tests/clipboard.test | 15 +- tests/clrpick.test | 16 +- tests/cmds.test | 15 +- tests/cursor.test | 228 ++++++++++--------- tests/entry.test | 16 +- tests/filebox.test | 227 +++++++++---------- tests/focus.test | 15 +- tests/focusTcl.test | 15 +- tests/font.test | 155 ++++++------- tests/frame.test | 349 ++++++++++++++++-------------- tests/geometry.test | 15 +- tests/get.test | 15 +- tests/id.test | 15 +- tests/imgBmap.test | 15 +- tests/imgPPM.test | 15 +- tests/imgPhoto.test | 4 +- tests/main.test | 15 +- tests/menu.test | 16 +- tests/menuDraw.test | 15 +- tests/menubut.test | 15 +- tests/msgbox.test | 34 ++- tests/obj.test | 16 +- tests/oldpack.test | 15 +- tests/option.test | 21 +- tests/panedwindow.test | 6 +- tests/raise.test | 15 +- tests/scale.test | 4 +- tests/scrollbar.test | 17 +- tests/select.test | 64 ++---- tests/textBTree.test | 15 +- tests/textDisp.test | 14 +- tests/textImage.test | 15 +- tests/textIndex.test | 15 +- tests/textMark.test | 15 +- tests/textTag.test | 15 +- tests/textWind.test | 27 +-- tests/unixEmbed.test | 15 +- tests/unixFont.test | 15 +- tests/util.test | 15 +- tests/visual.test | 258 +++++++++++----------- tests/winMenu.test | 14 +- tests/winSend.test | 48 ++-- tests/window.test | 14 +- tests/wm.test | 5 +- tests/xmfbox.test | 14 +- 59 files changed, 1150 insertions(+), 1657 deletions(-) diff --git a/ChangeLog b/ChangeLog index ebeefb2..08693fd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-05-23 Donal K. Fellows + * tests/*.test: Many minor fixes aiming towards making the Tk test + suite have better style. + * generic/tkVisual.c (Tk_GetVisual): Minor fix for error message. 2004-05-14 Donal K. Fellows diff --git a/tests/bell.test b/tests/bell.test index 59bfca6..455eb76 100644 --- a/tests/bell.test +++ b/tests/bell.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-2000 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: bell.test,v 1.7 2003/04/01 21:06:15 dgp Exp $ +# RCS: @(#) $Id: bell.test,v 1.8 2004/05/23 17:34:48 dkf Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -46,16 +46,3 @@ test bell-1.8 {bell command} { # cleanup cleanupTests return - - - - - - - - - - - - - diff --git a/tests/bgerror.test b/tests/bgerror.test index e104980..7d35862 100644 --- a/tests/bgerror.test +++ b/tests/bgerror.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: bgerror.test,v 1.5 2003/04/01 21:06:15 dgp Exp $ +# RCS: @(#) $Id: bgerror.test,v 1.6 2004/05/23 17:34:48 dkf Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -58,16 +58,3 @@ catch {rename tkerror {}} # cleanup cleanupTests return - - - - - - - - - - - - - diff --git a/tests/bind.test b/tests/bind.test index 9ecee81..9117204 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: bind.test,v 1.12 2003/04/01 21:06:16 dgp Exp $ +# RCS: @(#) $Id: bind.test,v 1.13 2004/05/23 17:34:48 dkf Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -2051,189 +2051,187 @@ test bind-22.18 {HandleEventGenerate} { # Bug 411307 list [catch {event gen . -root 98765} msg] $msg } {1 {bad window name/identifier "98765"}} -set i 19 foreach check { - { %a {-above .xyz} {{1 {bad window path name ".xyz"}}}} - { %a {-above .b} {[winfo id .b]}} - { %a {-above xyz} {{1 {bad window name/identifier "xyz"}}}} - { %a {-above [winfo id .b]} {[winfo id .b]}} - { %b {-above .} {{1 { event doesn't accept "-above" option}}}} - - { %B {-borderwidth xyz} {{1 {bad screen distance "xyz"}}}} - { %B {-borderwidth 2i} {[winfo pixels .b.f 2i]}} - { %k {-borderwidth 2i} {{1 { event doesn't accept "-borderwidth" option}}}} - - {