summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/README2
-rw-r--r--tests/all.tcl2
-rw-r--r--tests/arc.tcl2
-rw-r--r--tests/bell.test2
-rw-r--r--tests/bevel.tcl2
-rw-r--r--tests/bgerror.test2
-rw-r--r--tests/bind.test2
-rw-r--r--tests/bitmap.test2
-rw-r--r--tests/border.test2
-rw-r--r--tests/bugs.tcl2
-rw-r--r--tests/busy.test2
-rw-r--r--tests/butGeom.tcl2
-rw-r--r--tests/butGeom2.tcl2
-rw-r--r--tests/button.test2
-rw-r--r--tests/canvImg.test4
-rw-r--r--tests/canvMoveto.test2
-rw-r--r--tests/canvPs.test4
-rw-r--r--tests/canvPsArc.tcl2
-rw-r--r--tests/canvPsBmap.tcl2
-rw-r--r--tests/canvPsGrph.tcl2
-rw-r--r--tests/canvPsImg.tcl2
-rw-r--r--tests/canvPsText.tcl2
-rw-r--r--tests/canvRect.test2
-rw-r--r--tests/canvText.test2
-rw-r--r--tests/canvWind.test2
-rw-r--r--tests/canvas.test2
-rw-r--r--tests/choosedir.test3
-rw-r--r--tests/clipboard.test2
-rw-r--r--tests/clrpick.test3
-rw-r--r--tests/cmap.tcl2
-rw-r--r--tests/cmds.test2
-rw-r--r--tests/color.test19
-rw-r--r--tests/config.test2
-rw-r--r--tests/constraints.tcl2
-rw-r--r--tests/cursor.test4
-rw-r--r--tests/dialog.test3
-rw-r--r--tests/embed.test2
-rw-r--r--tests/entry.test2
-rw-r--r--tests/event.test2
-rw-r--r--tests/filebox.test5
-rw-r--r--tests/focus.test2
-rw-r--r--tests/focusTcl.test2
-rw-r--r--tests/font.test2
-rw-r--r--tests/fontchooser.test3
-rw-r--r--tests/frame.test2
-rw-r--r--tests/geometry.test2
-rw-r--r--tests/get.test2
-rw-r--r--tests/grab.test2
-rw-r--r--tests/grid.test2
-rw-r--r--tests/image.test2
-rw-r--r--tests/imgBmap.test2
-rw-r--r--tests/imgPNG.test2
-rw-r--r--tests/imgPPM.test2
-rw-r--r--tests/imgPhoto.test2
-rw-r--r--tests/listbox.test2
-rw-r--r--tests/main.test2
-rw-r--r--tests/menu.test2
-rw-r--r--tests/menuDraw.test2
-rw-r--r--tests/menubut.test4
-rw-r--r--tests/message.test2
-rw-r--r--tests/msgbox.test3
-rw-r--r--tests/obj.test2
-rw-r--r--tests/oldpack.test2
-rw-r--r--tests/option.test2
-rw-r--r--tests/pack.test2
-rw-r--r--tests/packgrid.test3
-rw-r--r--tests/panedwindow.test2
-rw-r--r--tests/place.test2
-rw-r--r--tests/raise.test2
-rw-r--r--tests/safe.test127
-rw-r--r--tests/scale.test4
-rw-r--r--tests/scrollbar.test2
-rw-r--r--tests/select.test4
-rw-r--r--tests/send.test2
-rw-r--r--tests/spinbox.test2
-rw-r--r--tests/text.test114
-rw-r--r--tests/textBTree.test2
-rw-r--r--tests/textDisp.test2
-rw-r--r--tests/textImage.test2
-rw-r--r--tests/textIndex.test2
-rw-r--r--tests/textMark.test57
-rw-r--r--tests/textTag.test15
-rw-r--r--tests/textWind.test2
-rw-r--r--tests/tk.test2
-rw-r--r--tests/ttk/all.tcl2
-rw-r--r--tests/ttk/checkbutton.test1
-rw-r--r--tests/ttk/image.test4
-rw-r--r--tests/ttk/labelframe.test4
-rw-r--r--tests/ttk/layout.test4
-rw-r--r--tests/ttk/notebook.test4
-rw-r--r--tests/ttk/panedwindow.test4
-rw-r--r--tests/ttk/progressbar.test4
-rw-r--r--tests/ttk/radiobutton.test1
-rw-r--r--tests/ttk/scrollbar.test4
-rw-r--r--tests/ttk/treetags.test3
-rw-r--r--tests/ttk/treeview.test2
-rw-r--r--tests/ttk/ttk.test55
-rw-r--r--tests/ttk/vsapi.test1
-rw-r--r--tests/unixButton.test2
-rw-r--r--tests/unixEmbed.test2
-rw-r--r--tests/unixFont.test2
-rw-r--r--tests/unixMenu.test4
-rw-r--r--tests/unixSelect.test2
-rw-r--r--tests/unixWm.test2
-rw-r--r--tests/util.test2
-rw-r--r--tests/visual.test4
-rw-r--r--tests/visual_bb.test2
-rw-r--r--tests/winButton.test2
-rw-r--r--tests/winClipboard.test4
-rw-r--r--tests/winDialog.test2
-rw-r--r--tests/winFont.test2
-rw-r--r--tests/winMenu.test2
-rw-r--r--tests/winMsgbox.test3
-rw-r--r--tests/winSend.test2
-rw-r--r--tests/winWm.test2
-rw-r--r--tests/window.test2
-rw-r--r--tests/winfo.test4
-rw-r--r--tests/wm.test2
-rw-r--r--tests/xmfbox.test4
119 files changed, 325 insertions, 332 deletions
diff --git a/tests/README b/tests/README
index facea75..677e76c 100644
--- a/tests/README
+++ b/tests/README
@@ -1,7 +1,5 @@
README -- Tk test suite design document.
-RCS: @(#) $Id: README,v 1.3 1999/04/16 01:51:33 stanton Exp $
-
This directory contains a set of validation tests for the Tk commands.
Please see the tests/README file in the Tcl source distribution for
information about the test suite.
diff --git a/tests/all.tcl b/tests/all.tcl
index 962b834..7f57dc2 100644
--- a/tests/all.tcl
+++ b/tests/all.tcl
@@ -8,8 +8,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: all.tcl,v 1.13 2007/12/13 15:27:54 dgp Exp $
package require Tcl 8.5
package require tcltest 2.2
diff --git a/tests/arc.tcl b/tests/arc.tcl
index 4315361..d0a93ea 100644
--- a/tests/arc.tcl
+++ b/tests/arc.tcl
@@ -1,7 +1,5 @@
# This file creates a visual test for arcs. It is part of the Tk
# visual test suite, which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: arc.tcl,v 1.3 1999/04/16 01:51:33 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/bell.test b/tests/bell.test
index b110619..4f7df97 100644
--- a/tests/bell.test
+++ b/tests/bell.test
@@ -4,8 +4,6 @@
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1998-2000 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: bell.test,v 1.9 2008/07/22 11:39:08 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/bevel.tcl b/tests/bevel.tcl
index ae6039a..950b714 100644
--- a/tests/bevel.tcl
+++ b/tests/bevel.tcl
@@ -1,8 +1,6 @@
# This file creates a visual test for bevels drawn around text in text
# widgets. It is part of the Tk visual test suite, which is invoked
# via the "visual" script.
-#
-# RCS: @(#) $Id: bevel.tcl,v 1.3 1999/04/16 01:51:33 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/bgerror.test b/tests/bgerror.test
index 6148c71..fd9594a 100644
--- a/tests/bgerror.test
+++ b/tests/bgerror.test
@@ -4,8 +4,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: bgerror.test,v 1.7 2008/07/22 11:48:24 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/bind.test b/tests/bind.test
index a4d8d6b..c777d66 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: bind.test,v 1.28 2010/06/19 16:18:41 jenglish Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/bitmap.test b/tests/bitmap.test
index 9a27b55..80bc114 100644
--- a/tests/bitmap.test
+++ b/tests/bitmap.test
@@ -5,8 +5,6 @@
# Copyright (c) 1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: bitmap.test,v 1.7 2008/07/22 11:55:57 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/border.test b/tests/border.test
index 0348959..78d0fcd 100644
--- a/tests/border.test
+++ b/tests/border.test
@@ -4,8 +4,6 @@
# Copyright (c) 1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: border.test,v 1.8 2008/07/22 11:55:57 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/bugs.tcl b/tests/bugs.tcl
index e1492b4..83d9519 100644
--- a/tests/bugs.tcl
+++ b/tests/bugs.tcl
@@ -7,8 +7,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: bugs.tcl,v 1.3 1999/04/16 01:51:34 stanton Exp $
if {[info procs test] != "test"} {
source defs
diff --git a/tests/busy.test b/tests/busy.test
index a402fff..304c2eb 100644
--- a/tests/busy.test
+++ b/tests/busy.test
@@ -5,8 +5,6 @@
# No output means no errors were found.
#
# Copyright (c) 1998-2000 by Jos Decoster. All rights reserved.
-#
-# RCS: @(#) $Id: busy.test,v 1.2 2008/11/03 11:54:25 patthoyts Exp $
package require tcltest 2.1
tcltest::configure {*}$argv
diff --git a/tests/butGeom.tcl b/tests/butGeom.tcl
index da91d08..2ee8fdc 100644
--- a/tests/butGeom.tcl
+++ b/tests/butGeom.tcl
@@ -1,7 +1,5 @@
# This file creates a visual test for button layout. It is part of
# the Tk visual test suite, which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: butGeom.tcl,v 1.3 1999/04/16 01:51:34 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/butGeom2.tcl b/tests/butGeom2.tcl
index 9dc223e..96ff209 100644
--- a/tests/butGeom2.tcl
+++ b/tests/butGeom2.tcl
@@ -1,7 +1,5 @@
# This file creates a visual test for button layout. It is part of
# the Tk visual test suite, which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: butGeom2.tcl,v 1.3 1999/04/16 01:51:34 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/button.test b/tests/button.test
index 7f1a318..984fd43 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: button.test,v 1.25 2009/01/13 01:46:05 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/canvImg.test b/tests/canvImg.test
index 1f3cf24..776d268 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvImg.test,v 1.12 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -795,4 +793,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/canvMoveto.test b/tests/canvMoveto.test
index cdf2a04..79761a4 100644
--- a/tests/canvMoveto.test
+++ b/tests/canvMoveto.test
@@ -5,8 +5,6 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Copyright (c) 2004 Neil McKay.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvMoveto.test,v 1.2 2008/10/01 00:09:23 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/canvPs.test b/tests/canvPs.test
index 1ef967a..c7ba958 100644
--- a/tests/canvPs.test
+++ b/tests/canvPs.test
@@ -5,8 +5,6 @@
# Copyright (c) 1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvPs.test,v 1.14 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -195,4 +193,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/canvPsArc.tcl b/tests/canvPsArc.tcl
index 6b57c2b..ef7ca6c 100644
--- a/tests/canvPsArc.tcl
+++ b/tests/canvPsArc.tcl
@@ -1,8 +1,6 @@
# This file creates a screen to exercise Postscript generation
# for bitmaps in canvases. It is part of the Tk visual test suite,
# which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: canvPsArc.tcl,v 1.4 1999/12/14 06:53:12 hobbs Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/canvPsBmap.tcl b/tests/canvPsBmap.tcl
index ee1a33d..4a7a7e2 100644
--- a/tests/canvPsBmap.tcl
+++ b/tests/canvPsBmap.tcl
@@ -1,8 +1,6 @@
# This file creates a screen to exercise Postscript generation
# for bitmaps in canvases. It is part of the Tk visual test suite,
# which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: canvPsBmap.tcl,v 1.5 2005/10/12 09:29:21 dkf Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/canvPsGrph.tcl b/tests/canvPsGrph.tcl
index 1b27898..343979f 100644
--- a/tests/canvPsGrph.tcl
+++ b/tests/canvPsGrph.tcl
@@ -1,8 +1,6 @@
# This file creates a screen to exercise Postscript generation
# for some of the graphical objects in canvases. It is part of the Tk
# visual test suite, which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: canvPsGrph.tcl,v 1.3 1999/04/16 01:51:35 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/canvPsImg.tcl b/tests/canvPsImg.tcl
index 73b854f..c06aeaa 100644
--- a/tests/canvPsImg.tcl
+++ b/tests/canvPsImg.tcl
@@ -1,8 +1,6 @@
# This file creates a screen to exercise Postscript generation
# for images in canvases. It is part of the Tk visual test suite,
# which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: canvPsImg.tcl,v 1.4 2005/10/12 09:29:21 dkf Exp $
# Build a test image in a canvas
proc BuildTestImage {} {
diff --git a/tests/canvPsText.tcl b/tests/canvPsText.tcl
index 145dcc7..08c9d27 100644
--- a/tests/canvPsText.tcl
+++ b/tests/canvPsText.tcl
@@ -1,8 +1,6 @@
# This file creates a screen to exercise Postscript generation
# for text in canvases. It is part of the Tk visual test suite,
# which is invoked via the "visual" script.
-#
-# RCS: @(#) $Id: canvPsText.tcl,v 1.3 1999/04/16 01:51:35 stanton Exp $
catch {destroy .t}
toplevel .t
diff --git a/tests/canvRect.test b/tests/canvRect.test
index 9c34293..a2cc51c 100644
--- a/tests/canvRect.test
+++ b/tests/canvRect.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvRect.test,v 1.11 2008/10/07 00:10:07 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/canvText.test b/tests/canvText.test
index 2ca02f0..f0c677f 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -5,8 +5,6 @@
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvText.test,v 1.22 2008/11/22 18:08:51 dkf Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/canvWind.test b/tests/canvWind.test
index 5115f34..436ee2c 100644
--- a/tests/canvWind.test
+++ b/tests/canvWind.test
@@ -5,8 +5,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: canvWind.test,v 1.7 2008/08/18 16:09:10 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/canvas.test b/tests/canvas.test
index 50ba807..5e621ed 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -6,8 +6,6 @@
# Copyright (c) 1998-2000 Ajuba Solutions.
# Copyright (c) 2008 Donal K. Fellows
# All rights reserved.
-#
-# RCS: @(#) $Id: canvas.test,v 1.30 2010/01/19 22:10:03 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/choosedir.test b/tests/choosedir.test
index 65cc4cb..fb6e62d 100644
--- a/tests/choosedir.test
+++ b/tests/choosedir.test
@@ -4,9 +4,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: choosedir.test,v 1.16 2008/08/12 22:52:23 aniap Exp $
-#
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/clipboard.test b/tests/clipboard.test
index 370400d..6077940 100644
--- a/tests/clipboard.test
+++ b/tests/clipboard.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: clipboard.test,v 1.12 2009/07/20 22:56:43 dkf Exp $
#
# Note: Multiple display clipboard handling will only be tested if the
diff --git a/tests/clrpick.test b/tests/clrpick.test
index 7a94b97..5f1b8b5 100644
--- a/tests/clrpick.test
+++ b/tests/clrpick.test
@@ -4,9 +4,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: clrpick.test,v 1.15 2008/12/19 15:33:40 dgp Exp $
-#
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/cmap.tcl b/tests/cmap.tcl
index dca7f71..cca4c24 100644
--- a/tests/cmap.tcl
+++ b/tests/cmap.tcl
@@ -1,8 +1,6 @@
# This file creates a visual test for colormaps and the WM_COLORMAP_WINDOWS
# property. It is part of the Tk visual test suite, which is invoked
# via the "visual" script.
-#
-# RCS: @(#) $Id: cmap.tcl,v 1.3 1999/04/16 01:51:35 stanton Exp $
catch {destroy .t}
toplevel .t -colormap new
diff --git a/tests/cmds.test b/tests/cmds.test
index f8fa690..fa7e788 100644
--- a/tests/cmds.test
+++ b/tests/cmds.test
@@ -4,8 +4,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: cmds.test,v 1.7 2008/08/03 15:28:53 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/color.test b/tests/color.test
index 1be8097..a7ed1f8 100644
--- a/tests/color.test
+++ b/tests/color.test
@@ -4,8 +4,6 @@
# Copyright (c) 1995-1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: color.test,v 1.8 2004/06/17 22:38:57 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
@@ -72,8 +70,8 @@ proc closest {w r g b} {
# vals - List of intensities.
proc c255 {vals} {
- list [expr [lindex $vals 0]/256] [expr [lindex $vals 1]/256] \
- [expr [lindex $vals 2]/256]
+ list [expr {[lindex $vals 0]/256}] [expr {[lindex $vals 1]/256}] \
+ [expr {[lindex $vals 2]/256}]
}
# colorsFree --
@@ -151,6 +149,19 @@ test color-1.4 {Tk_AllocColorFromObj - try other colors in list} colorsFree {
pack .b2 -side top
lappend result [testcolor purple]
} {{{1 1}} {{1 1} {1 0}} {{1 0} {2 1}}}
+test color-1.5 {Color table} nonPortable {
+ set fd [open ../xlib/rgb.txt]
+ set result {}
+ while {[gets $fd line] != -1} {
+ if {[string index $line 0] == "!"} continue
+ set rgb [c255 [winfo rgb . [lrange $line 3 end]]]
+ if {$rgb != [lrange $line 0 2] } {
+ append result $line\n
+ }
+
+ }
+ return $result
+} {}
test color-2.1 {Tk_GetColor procedure} colorsFree {
c255 [winfo rgb .t #FF0000]
diff --git a/tests/config.test b/tests/config.test
index fca6d5c..8f7aa9f 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -5,8 +5,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: config.test,v 1.9 2008/08/07 23:05:15 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index ac32852..e28b159 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -235,7 +235,7 @@ if {![string match {{22 3 6 15} {31 18 [34] 15}} $x]} {
testConstraint fonts 0
}
testConstraint textfonts [expr {
- [testConstraint fonts] || $tcl_platform(platform) eq "windows"
+ [testConstraint fonts] || [tk windowingsystem] eq "win32"
}]
# constraints for the visuals available..
diff --git a/tests/cursor.test b/tests/cursor.test
index 4d2e608..1039b52 100644
--- a/tests/cursor.test
+++ b/tests/cursor.test
@@ -5,8 +5,6 @@
# Copyright (c) 1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: cursor.test,v 1.19 2008/07/28 10:53:45 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -842,4 +840,4 @@ test cursor-7.9 {check Windows cursor wait} -constraints win -setup {
# cleanup
cleanupTests
-return \ No newline at end of file
+return
diff --git a/tests/dialog.test b/tests/dialog.test
index 82ee799..78b6620 100644
--- a/tests/dialog.test
+++ b/tests/dialog.test
@@ -1,8 +1,5 @@
# This file is a Tcl script to test out Tk's "tk_dialog" command.
# It is organized in the standard fashion for Tcl tests.
-#
-# RCS: @(#) $Id: dialog.test,v 1.7 2009/06/29 14:35:01 das Exp $
-#
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/embed.test b/tests/embed.test
index 79f47b2..8a29862 100644
--- a/tests/embed.test
+++ b/tests/embed.test
@@ -3,8 +3,6 @@
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: embed.test,v 1.6 2008/12/19 15:33:40 dgp Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/entry.test b/tests/entry.test
index b097ab7..11408ac 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: entry.test,v 1.26 2008/10/09 17:20:00 dgp Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/event.test b/tests/event.test
index af15eff..1548467 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: event.test,v 1.17 2008/08/13 23:58:21 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/filebox.test b/tests/filebox.test
index cf8daba..7b9fa2c 100644
--- a/tests/filebox.test
+++ b/tests/filebox.test
@@ -5,9 +5,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: filebox.test,v 1.22 2008/12/29 16:28:57 das Exp $
-#
package require tcltest 2.1
eval tcltest::configure $argv
@@ -114,7 +111,7 @@ if {$tcl_platform(platform) == "unix"} {
}
set unknownOptionsMsg(tk_getOpenFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -multiple, -parent, -title, or -typevariable}
-set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable}
+set unknownOptionsMsg(tk_getSaveFile) {bad option "-foo": must be -confirmoverwrite, -defaultextension, -filetypes, -initialdir, -initialfile, -parent, -title, or -typevariable}
set tmpFile "filebox.tmp"
makeFile {
diff --git a/tests/focus.test b/tests/focus.test
index c1715b3..45cf73b 100644
--- a/tests/focus.test
+++ b/tests/focus.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: focus.test,v 1.12 2008/08/16 23:52:34 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/focusTcl.test b/tests/focusTcl.test
index be07fff..ef848bb 100644
--- a/tests/focusTcl.test
+++ b/tests/focusTcl.test
@@ -6,8 +6,6 @@
# Copyright (c) 1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: focusTcl.test,v 1.9 2008/08/16 23:52:34 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/font.test b/tests/font.test
index 2d7a7f9..3a2568c 100644
--- a/tests/font.test
+++ b/tests/font.test
@@ -5,8 +5,6 @@
# Copyright (c) 1996-1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: font.test,v 1.20 2009/05/13 21:33:32 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/fontchooser.test b/tests/fontchooser.test
index a634300..4dad5da 100644
--- a/tests/fontchooser.test
+++ b/tests/fontchooser.test
@@ -1,9 +1,6 @@
# Test the "tk::fontchooser" command
#
# Copyright (c) 2008 Pat Thoyts
-#
-# RCS: @(#) $Id: fontchooser.test,v 1.2 2008/12/10 13:41:19 patthoyts Exp $
-#
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/frame.test b/tests/frame.test
index 577cac7..35b9605 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: frame.test,v 1.18 2008/08/15 01:10:03 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/geometry.test b/tests/geometry.test
index 56aa3ad..13cc515 100644
--- a/tests/geometry.test
+++ b/tests/geometry.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: geometry.test,v 1.7 2008/08/17 19:40:33 aniap Exp $
proc getsize w {
regexp {(^[^+-]*)} [wm geometry $w] foo x
diff --git a/tests/get.test b/tests/get.test
index dd09f15..ea08c8c 100644
--- a/tests/get.test
+++ b/tests/get.test
@@ -5,8 +5,6 @@
# Copyright (c) 1998 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: get.test,v 1.6 2008/08/03 15:28:53 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/grab.test b/tests/grab.test
index c9f6688..33399cb 100644
--- a/tests/grab.test
+++ b/tests/grab.test
@@ -6,8 +6,6 @@
#
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
-#
-# RCS: @(#) $Id: grab.test,v 1.5 2008/08/16 23:52:34 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/grid.test b/tests/grid.test
index 38a119d..b27318e 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -4,8 +4,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: grid.test,v 1.35 2009/08/19 23:02:00 pspjuth Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/image.test b/tests/image.test
index 184024c..3134ee8 100644
--- a/tests/image.test
+++ b/tests/image.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: image.test,v 1.17 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/imgBmap.test b/tests/imgBmap.test
index 6d0c02d..5ffd7c4 100644
--- a/tests/imgBmap.test
+++ b/tests/imgBmap.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: imgBmap.test,v 1.9 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/imgPNG.test b/tests/imgPNG.test
index 2c31e95..0757411 100644
--- a/tests/imgPNG.test
+++ b/tests/imgPNG.test
@@ -7,8 +7,6 @@
# Copyright (c) 1998 Willem van Schaik (images only)
# Copyright (c) 2008 Donal K. Fellows
# All rights reserved.
-#
-# RCS: @(#) $Id: imgPNG.test,v 1.4 2010/04/25 18:23:52 dkf Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/imgPPM.test b/tests/imgPPM.test
index 38cdbd1..456427f 100644
--- a/tests/imgPPM.test
+++ b/tests/imgPPM.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: imgPPM.test,v 1.12 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index 079bed9..e85f512 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -9,8 +9,6 @@
# All rights reserved.
#
# Author: Paul Mackerras (paulus@cs.anu.edu.au)
-#
-# RCS: @(#) $Id: imgPhoto.test,v 1.36 2010/04/09 13:15:32 dkf Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/listbox.test b/tests/listbox.test
index 82eebee..0805528 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: listbox.test,v 1.34 2008/10/09 21:21:03 dgp Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/main.test b/tests/main.test
index 9f117f7..7ab624f 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -7,8 +7,6 @@
# Copyright (c) 1997 by Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: main.test,v 1.13 2010/12/13 15:25:35 nijtmans Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/menu.test b/tests/menu.test
index 5dd89ab..595a21b 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -4,8 +4,6 @@
# Copyright (c) 1995-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: menu.test,v 1.26 2010/01/05 09:40:46 dkf Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/menuDraw.test b/tests/menuDraw.test
index c772fac..bb632c6 100644
--- a/tests/menuDraw.test
+++ b/tests/menuDraw.test
@@ -4,8 +4,6 @@
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: menuDraw.test,v 1.12 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/menubut.test b/tests/menubut.test
index 17bf013..6efdb0f 100644
--- a/tests/menubut.test
+++ b/tests/menubut.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: menubut.test,v 1.13 2009/01/13 01:46:06 patthoyts Exp $
# XXX This test file is woefully incomplete right now. If any part
# XXX of a procedure has tests then the whole procedure has tests,
@@ -761,4 +759,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/message.test b/tests/message.test
index b548b97..dcffc72 100644
--- a/tests/message.test
+++ b/tests/message.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-2000 by Ajuba Solutions.
# All rights reserved.
-#
-# RCS: @(#) $Id: message.test,v 1.5 2008/07/28 11:12:32 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/msgbox.test b/tests/msgbox.test
index 1056030..643ae2c 100644
--- a/tests/msgbox.test
+++ b/tests/msgbox.test
@@ -4,9 +4,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: msgbox.test,v 1.10 2008/08/21 11:19:33 aniap Exp $
-#
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/obj.test b/tests/obj.test
index 3cd7230..eece58e 100644
--- a/tests/obj.test
+++ b/tests/obj.test
@@ -4,8 +4,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: obj.test,v 1.6 2008/08/11 21:33:17 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/oldpack.test b/tests/oldpack.test
index 76cf054..72ec065 100644
--- a/tests/oldpack.test
+++ b/tests/oldpack.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: oldpack.test,v 1.9 2008/08/21 11:19:33 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/option.test b/tests/option.test
index 2cf574e..66df70c 100644
--- a/tests/option.test
+++ b/tests/option.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: option.test,v 1.7 2008/08/28 08:52:05 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/pack.test b/tests/pack.test
index 8236750..eac1562 100644
--- a/tests/pack.test
+++ b/tests/pack.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: pack.test,v 1.15 2008/08/21 11:19:33 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/packgrid.test b/tests/packgrid.test
index 66d4e4c..355b49d 100644
--- a/tests/packgrid.test
+++ b/tests/packgrid.test
@@ -4,9 +4,6 @@
#
# Copyright (c) 2008 Peter Spjuth
# All rights reserved.
-#
-# RCS: @(#) $Id: packgrid.test,v 1.2 2009/09/18 22:35:00 pspjuth Exp $
-#
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index ec48f1e..f2e01e8 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: panedwindow.test,v 1.23 2008/08/21 11:19:33 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/place.test b/tests/place.test
index 7602766..ddfa64c 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -4,8 +4,6 @@
# Copyright (c) 1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: place.test,v 1.12 2008/08/28 08:52:05 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/raise.test b/tests/raise.test
index 2431264..461ccbf 100644
--- a/tests/raise.test
+++ b/tests/raise.test
@@ -7,8 +7,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: raise.test,v 1.11 2008/08/18 16:09:10 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/safe.test b/tests/safe.test
index 7ec859c..e7ed6c7 100644
--- a/tests/safe.test
+++ b/tests/safe.test
@@ -1,12 +1,10 @@
-# This file is a Tcl script to test the Safe Tk facility. It is organized
-# in the standard fashion for Tk tests.
+# This file is a Tcl script to test the Safe Tk facility. It is organized in
+# the standard fashion for Tk tests.
#
# Copyright (c) 1994 The Regents of the University of California.
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: safe.test,v 1.19 2008/08/16 23:52:34 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
@@ -30,22 +28,34 @@ namespace import -force tcltest::test
# This probably means that tk wasn't installed properly.
## it indicates that something went wrong sourcing tk.tcl.
-## Ensure that any changes that occured to tk.tcl will work or
-## are properly prevented in a safe interpreter. -- hobbs
+## Ensure that any changes that occured to tk.tcl will work or are properly
+## prevented in a safe interpreter. -- hobbs
# The set of hidden commands is platform dependent:
-if {[string equal $tcl_platform(platform) "windows"]} {
- set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection socket source tk_chooseColor tk_chooseDirectory tk_getOpenFile tk_getSaveFile tk_messageBox toplevel unload wm}
-} else {
- set hidden_cmds {bell cd clipboard encoding exec exit fconfigure file glob grab load menu open pwd selection send socket source toplevel unload wm}
+set hidden_cmds {bell cd clipboard encoding exec exit fconfigure glob grab load menu open pwd selection socket source toplevel unload wm}
+lappend hidden_cmds {*}[apply {{} {
+ foreach cmd {
+ atime attributes copy delete dirname executable exists extension
+ isdirectory isfile link lstat mkdir mtime nativename normalize owned
+ readable readlink rename rootname size stat tail tempfile type
+ volumes writable
+ } {lappend result tcl:file:$cmd}; return $result
+}}]
+if {[tk windowingsystem] ne "x11"} {
+ lappend hidden_cmds tk_chooseColor tk_chooseDirectory tk_getOpenFile \
+ tk_getSaveFile tk_messageBox
+}
+if {[llength [info commands send]]} {
+ lappend hidden_cmds send
}
set saveAutoPath $::auto_path
set auto_path [list [info library] $::tk_library]
-
+set hidden_cmds [lsort $hidden_cmds]
+
test safe-1.1 {Safe Tk loading into an interpreter} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::loadTk [safe::interpCreate a]
safe::interpDelete a
@@ -53,7 +63,7 @@ test safe-1.1 {Safe Tk loading into an interpreter} -setup {
return $x
} -result {}
test safe-1.2 {Safe Tk loading into an interpreter} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -62,18 +72,17 @@ test safe-1.2 {Safe Tk loading into an interpreter} -setup {
safe::interpDelete a
} -result $hidden_cmds
test safe-1.3 {Safe Tk loading into an interpreter} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
lsort [interp aliases a]
} -cleanup {
safe::interpDelete a
-} -match glob -result {*encoding*exit*file*load*source*}
-
+} -match glob -result {*encoding*exit*glob*load*source*}
test safe-2.1 {Unsafe commands not available} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -86,7 +95,7 @@ test safe-2.1 {Unsafe commands not available} -setup {
safe::interpDelete a
} -result ok
test safe-2.2 {Unsafe commands not available} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -99,7 +108,7 @@ test safe-2.2 {Unsafe commands not available} -setup {
safe::interpDelete a
} -result ok
test safe-2.3 {Unsafe subcommands not available} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -109,10 +118,10 @@ test safe-2.3 {Unsafe subcommands not available} -setup {
}
list $status $msg
} -cleanup {
- safe::interpDelete a
+ safe::interpDelete a
} -result {ok {appname not accessible in a safe interpreter}}
test safe-2.4 {Unsafe subcommands not available} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -122,12 +131,11 @@ test safe-2.4 {Unsafe subcommands not available} -setup {
}
list $status $msg
} -cleanup {
- safe::interpDelete a
+ safe::interpDelete a
} -result {ok {scaling not accessible in a safe interpreter}}
-
test safe-3.1 {Unsafe commands are available hidden} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -140,7 +148,7 @@ test safe-3.1 {Unsafe commands are available hidden} -setup {
safe::interpDelete a
} -result ok
test safe-3.2 {Unsafe commands are available hidden} -setup {
- catch {safe::interpDelete a}
+ catch {safe::interpDelete a}
} -body {
safe::interpCreate a
safe::loadTk a
@@ -153,71 +161,66 @@ test safe-3.2 {Unsafe commands are available hidden} -setup {
safe::interpDelete a
} -result ok
-
test safe-4.1 {testing loadTk} -body {
- # no error shall occur, the user will
- # eventually see a new toplevel
+ # no error shall occur, the user will eventually see a new toplevel
set i [safe::loadTk [safe::interpCreate]]
interp eval $i {button .b -text "hello world!"; pack .b}
- # lets don't update because it might imply that the user has
- # to position the window (if the wm does not do it automatically)
- # and thus make the test suite not runable non interactively
+ # lets don't update because it might imply that the user has to position
+ # the window (if the wm does not do it automatically) and thus make the
+ # test suite not runable non interactively
safe::interpDelete $i
} -result {}
-
-test safe-4.2 {testing loadTk -use} -body {
+test safe-4.2 {testing loadTk -use} -setup {
+ destroy .safeTkFrame
+} -body {
set w .safeTkFrame
- destroy $w
frame $w -container 1;
- pack .safeTkFrame
+ pack $w
set i [safe::loadTk [safe::interpCreate] -use [winfo id $w]]
interp eval $i {button .b -text "hello world!"; pack .b}
safe::interpDelete $i
destroy $w
} -result {}
-
test safe-5.1 {loading Tk in safe interps without master's clearance} -body {
set i [safe::interpCreate]
interp eval $i {load {} Tk}
} -cleanup {
safe::interpDelete $i
} -returnCodes error -result {not allowed to start Tk by master's safe::TkInit}
-
-test safe-5.2 {multi-level Tk loading with clearance} -body {
- # No error shall occur in that test and no window
- # shall remain at the end.
- set i [safe::interpCreate]
- set j [list $i x]
- set j [safe::interpCreate $j]
- safe::loadTk $j
- interp eval $j {
- button .b -text Ok -command {destroy .}
- pack .b
-# tkwait window . ; # for interactive testing/debugging
+test safe-5.2 {multi-level Tk loading with clearance} -setup {
+ set safeParent [safe::interpCreate]
+} -body {
+ # No error shall occur in that test and no window shall remain at the end.
+ set i [safe::interpCreate [list $safeParent x]]
+ safe::loadTk $i
+ interp eval $i {
+ button .b -text Ok -command {destroy .}
+ pack .b
+# tkwait window . ; # for interactive testing/debugging
}
} -cleanup {
- safe::interpDelete $j
- safe::interpDelete $i
+ catch {safe::interpDelete $i}
+ safe::interpDelete $safeParent
} -result {}
-
-test safe-6.1 {loadTk -use windowPath} -body {
+test safe-6.1 {loadTk -use windowPath} -setup {
+ destroy .safeTkFrame
+} -body {
set w .safeTkFrame
- destroy $w
frame $w -container 1;
- pack .safeTkFrame
+ pack $w
set i [safe::loadTk [safe::interpCreate] -use $w]
interp eval $i {button .b -text "hello world!"; pack .b}
safe::interpDelete $i
destroy $w
} -result {}
-
-test safe-6.2 {loadTk -use windowPath, conflicting -display} -body {
+test safe-6.2 {loadTk -use windowPath, conflicting -display} -setup {
+ destroy .safeTkFrame
+} -body {
set w .safeTkFrame
- destroy $w
frame $w -container 1;
- pack .safeTkFrame
+ pack $w
set i [safe::interpCreate]
catch {safe::loadTk $i -use $w -display :23.56} msg
string range $msg 0 36
@@ -226,18 +229,20 @@ test safe-6.2 {loadTk -use windowPath, conflicting -display} -body {
destroy $w
} -result {conflicting -display :23.56 and -use }
-
test safe-7.1 {canvas printing} -body {
set i [safe::loadTk [safe::interpCreate]]
interp eval $i {canvas .c; .c postscript}
} -cleanup {
safe::interpDelete $i
} -returnCodes ok -match glob -result *
-
+
# cleanup
set ::auto_path $saveAutoPath
unset hidden_cmds
cleanupTests
return
-
+# Local Variables:
+# mode: tcl
+# fill-column: 78
+# End:
diff --git a/tests/scale.test b/tests/scale.test
index 6763848..13ccb4d 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: scale.test,v 1.17 2008/08/28 08:52:05 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -1363,4 +1361,4 @@ option clear
# cleanup
cleanupTests
-return \ No newline at end of file
+return
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 43882ef..3addd28 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: scrollbar.test,v 1.24 2008/12/12 00:09:38 nijtmans Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/select.test b/tests/select.test
index 6e29be5..77bfb2e 100644
--- a/tests/select.test
+++ b/tests/select.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: select.test,v 1.20 2009/07/23 22:21:35 dkf Exp $
#
# Note: Multiple display selection handling will only be tested if the
@@ -630,7 +628,7 @@ test select-5.15 {Tk_GetSelection procedure} -setup {
set ::bgerrors {}
} -body {
proc ::bgerror msg {lappend ::bgerrors $msg}
- selection handle .f1 ERROR errHandler
+ selection handle -type ERROR .f1 errHandler
list [catch {selection get ERROR} msg] $msg [update] {*}$::bgerrors
} -cleanup {
rename ::bgerror {}
diff --git a/tests/send.test b/tests/send.test
index 0362474..e3156a1 100644
--- a/tests/send.test
+++ b/tests/send.test
@@ -9,8 +9,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: send.test,v 1.12 2008/07/23 23:24:25 nijtmans Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 80c82b7..b8170c5 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: spinbox.test,v 1.13 2008/10/10 16:15:45 dgp Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/text.test b/tests/text.test
index cb2c006..f8cb3d7 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: text.test,v 1.56 2010/03/11 09:24:09 dkf Exp $
package require tcltest 2.2
eval tcltest::configure $argv
@@ -2617,6 +2615,24 @@ test text-10.38 {TextWidgetCmd procedure, "count" option} -setup {
} -cleanup {
destroy .t
} -result {3 903 903 45}
+test text-10.39 {TextWidgetCmd procedure, "count" option} -setup {
+ text .t
+ pack .t
+ update
+ set res {}
+} -body {
+ .t insert end "Line 1 - This is Line 1\n"
+ .t insert end "Line 2 - This is Line 2\n"
+ .t insert end "Line 3 - This is Line 3\n"
+ .t insert end "Line 4 - This is Line 4\n"
+ .t insert end "Line 5 - This is Line 5\n"
+ lappend res [.t count -displaylines 1.19 3.24] [.t count -displaylines 1.0 end]
+ .t tag add hidden 2.9 3.17
+ .t tag configure hidden -elide true
+ lappend res [.t count -displaylines 1.19 3.24] [.t count -displaylines 1.0 end]
+} -cleanup {
+ destroy .t
+} -result {2 6 2 5}
test text-11.1 {counting with tag priority eliding} -setup {
@@ -6634,6 +6650,100 @@ test text-34.1 {peer widget -start, -end and selection} -setup {
destroy .t
} -result {{10.0 20.0} {6.0 16.0} {6.0 11.0} {1.0 6.0} {1.0 2.0} {} {10.0 20.0}}
+test text-32.2 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5
+ # none of the following delete shall crash
+ # (all did before fixing bug 1630262)
+ # 1. delete on the same line: line1 == line2 in DeleteIndexRange,
+ # and resetView is true neither for .t not for .pt
+ .pt delete 2.0 2.2
+ # 2. delete just one line: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 3.0
+ # 3. delete several lines: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 5.0
+ # 4. delete to the end line: line1 < line2 in DeleteIndexRange,
+ # and resetView is true only for .t, not for .pt
+ .pt delete 2.0 end
+ # this test succeeds provided there is no crash
+ set res 1
+} -cleanup {
+ destroy .pt
+} -result {1}
+
+test text-32.3 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5
+ .pt configure -startline 3
+ # the following delete shall not crash
+ # (it did before fixing bug 1630262)
+ .pt delete 2.0 3.0
+ # moreover -startline shall be correct
+ # (was wrong before fixing bug 1630262)
+ lappend res [.t cget -start] [.pt cget -start]
+} -cleanup {
+ destroy .pt
+} -result {4 3}
+
+test text-32.4 {peer widget -start, -end and deletion (bug 1630262)} -setup {
+ destroy .t .pt
+ set res {}
+} -body {
+ text .t
+ .t peer create .pt
+ for {set i 1} {$i < 100} {incr i} {
+ .t insert end "Line $i\n"
+ }
+ .t configure -startline 5 -endline 15
+ .pt configure -startline 8 -endline 12
+ # .pt now shows a range entirely inside the range of .pt
+ # from .t, delete lines located after [.pt cget -end]
+ .t delete 9.0 10.0
+ # from .t, delete lines straddling [.pt cget -end]
+ .t delete 6.0 9.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 5 -endline 12
+ .pt configure -startline 8 -endline 12
+ # .pt now shows again a range entirely inside the range of .pt
+ # from .t, delete lines located before [.pt cget -start]
+ .t delete 2.0 3.0
+ # from .t, delete lines straddling [.pt cget -start]
+ .t delete 2.0 5.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 22 -endline 31
+ .pt configure -startline 42 -endline 51
+ # .t now shows a range entirely before the range of .pt
+ # from .t, delete some lines, then do it from .pt
+ .t delete 2.0 3.0
+ .t delete 2.0 5.0
+ .pt delete 2.0 5.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+ .t configure -startline 55 -endline 75
+ .pt configure -startline 60 -endline 70
+ # .pt now shows a range entirely inside the range of .t
+ # from .t, delete a range straddling the entire range of .pt
+ .t delete 3.0 18.0
+ lappend res [.t cget -start] [.t cget -end] [.pt cget -start] [.pt cget -end]
+} -cleanup {
+ destroy .pt .t
+} -result {5 11 8 10 5 8 6 8 22 27 38 44 55 60 57 57}
+
test text-35.1 {widget dump -command alters tags} -setup {
proc Dumpy {key value index} {
#puts "KK: $key, $value"
diff --git a/tests/textBTree.test b/tests/textBTree.test
index fc13817..41b3d98 100644
--- a/tests/textBTree.test
+++ b/tests/textBTree.test
@@ -7,8 +7,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textBTree.test,v 1.8 2008/08/28 08:52:06 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 1d72ca5..8e99eff 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textDisp.test,v 1.44 2010/01/07 15:32:18 dkf Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/textImage.test b/tests/textImage.test
index 5127b49..24246cc 100644
--- a/tests/textImage.test
+++ b/tests/textImage.test
@@ -6,8 +6,6 @@
#
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textImage.test,v 1.14 2010/02/16 21:12:57 nijtmans Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/textIndex.test b/tests/textIndex.test
index 3b417d0..a6752cb 100644
--- a/tests/textIndex.test
+++ b/tests/textIndex.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textIndex.test,v 1.19 2009/08/19 23:02:00 pspjuth Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/textMark.test b/tests/textMark.test
index 62cab1b..edd0e92 100644
--- a/tests/textMark.test
+++ b/tests/textMark.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textMark.test,v 1.13 2008/12/19 15:33:40 dgp Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -20,6 +18,7 @@ update
.t debug on
wm geometry . {}
entry .t.e
+.t peer create .pt
.t insert 1.0 "Line 1
abcdefghijklm
@@ -142,6 +141,47 @@ test textMark-6.1 {TkTextMarkSegToIndex} -body {
.t mark set d 1.4
list [.t index a] [.t index b] [.t index c ] [.t index d]
} -result {1.2 1.2 1.2 1.4}
+test textMark-6.2 {TkTextMarkNameToIndex, with mark outside -startline/-endline range - bug 1630271} -body {
+ .t mark set insert 1.0
+ .t configure -startline 2
+ set res [list [.t index insert] [.t index insert-1c] [.t get insert]]
+ .t mark set insert end
+ .t configure -endline 4
+ lappend res [.t index insert]
+} -cleanup {
+ .t configure -startline {} -endline {}
+} -result {1.0 1.0 a 2.5}
+test textMark-6.3 {TkTextMarkNameToIndex, with mark outside -startline/-endline range - bug 1630271} -body {
+ .t mark set mymark 1.0
+ .t configure -startline 2
+ list [catch {.t index mymark} msg] $msg
+} -cleanup {
+ .t configure -startline {} -endline {}
+ .t mark unset mymark
+} -result {1 {bad text index "mymark"}}
+test textMark-6.4 {TkTextMarkNameToIndex, with mark outside -startline/-endline range - bug 1630271} -body {
+ .t mark set mymark 1.0
+ .t configure -startline 2
+ set res [list [catch {.t index mymark} msg] $msg]
+ lappend res [.pt index mymark]
+ .t configure -startline {}
+ .pt configure -startline 4
+ lappend res [.t index mymark]
+ lappend res [catch {.pt index mymark} msg] $msg
+ lappend res [.t get mymark]
+ lappend res [catch {.pt get mymark} msg] $msg
+} -cleanup {
+ .t configure -startline {} -endline {}
+ .pt configure -startline {} -endline {}
+ .t mark unset mymark
+} -result {1 {bad text index "mymark"} 1.0 1.0 1 {bad text index "mymark"} L 1 {bad text index "mymark"}}
+test textMark-6.5 {insert and current marks in an empty peer - bug 3487407} -body {
+ .t mark set insert 1.0
+ .t configure -start 5 -end 5
+ set res [.t index insert]
+} -cleanup {
+ .t configure -startline {} -endline {}
+} -result {1.0}
test textMark-7.1 {MarkFindNext - invalid mark name} -body {
.t mark next bogus
@@ -190,6 +230,12 @@ test textMark-7.8 {MarkFindNext - no next mark} -setup {
.t mark set insert 3.0
.t mark next insert
} -result {}
+test textMark-7.9 {MarkFindNext - mark set in a text widget and retrieved from a peer} -setup {
+ .t mark unset {*}[.t mark names]
+} -body {
+ .t mark set mymark 1.0
+ lsort [list [.pt mark next 1.0] [.pt mark next mymark] [.pt mark next insert]]
+} -result {current insert mymark}
test textMark-8.1 {MarkFindPrev - invalid mark name} -body {
.t mark prev bogus
@@ -241,7 +287,14 @@ test textMark-8.8 {MarkFindPrev - no previous mark} -setup {
.t mark set insert 3.0
.t mark prev current
} -result {}
+test textMark-8.9 {MarkFindPrev - mark set in a text widget and retrieved from a peer} -setup {
+ .t mark unset {*}[.t mark names]
+} -body {
+ .t mark set mymark 1.0
+ lsort [list [.pt mark prev end] [.pt mark prev current] [.pt mark prev insert]]
+} -result {current insert mymark}
+destroy .pt
destroy .t
# cleanup
diff --git a/tests/textTag.test b/tests/textTag.test
index 4f43f6b..fed073a 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textTag.test,v 1.16 2009/04/02 09:41:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -406,6 +404,19 @@ test textTag-2.12 {TkTextTagCmd - "add" option} -constraints {
} -cleanup {
.t tag remove sel 1.0 end
} -result {1.1 1.5 2.4 2.5}
+test textTag-2.14 {tag add before -startline - Bug 1615425} haveCourier12 {
+ text .tt
+ for {set i 1} {$i <10} {incr i} {
+ .tt insert end "Line $i\n"
+ }
+ .tt tag configure mytag -font {Courier 12 bold}
+ .tt peer create .ptt
+ .ptt configure -startline 3 -endline 7
+ # the test succeeds if next line does not crash
+ .tt tag add mytag 1.0 1.end
+ destroy .ptt .tt
+ set res 1
+} {1}
test textTag-3.1 {TkTextTagCmd - "bind" option} -constraints {
diff --git a/tests/textWind.test b/tests/textWind.test
index 1cf0ecc..c3483e6 100644
--- a/tests/textWind.test
+++ b/tests/textWind.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: textWind.test,v 1.24 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/tk.test b/tests/tk.test
index 6722616..748a6cf 100644
--- a/tests/tk.test
+++ b/tests/tk.test
@@ -4,8 +4,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Copyright (c) 2002 ActiveState Corporation.
-#
-# RCS: @(#) $Id: tk.test,v 1.17 2008/12/10 10:54:56 patthoyts Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl
index 2cc7bad..da2e316 100644
--- a/tests/ttk/all.tcl
+++ b/tests/ttk/all.tcl
@@ -8,8 +8,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: all.tcl,v 1.3 2007/12/13 15:28:49 dgp Exp $
package require Tcl 8.5
package require tcltest 2.2
diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test
index 1ff6320..e18ff32 100644
--- a/tests/ttk/checkbutton.test
+++ b/tests/ttk/checkbutton.test
@@ -1,4 +1,3 @@
-# $Id: checkbutton.test,v 1.1 2008/12/31 23:10:48 jenglish Exp $
#
# ttk::checkbutton widget tests.
#
diff --git a/tests/ttk/image.test b/tests/ttk/image.test
index 8f7338e..a55f7f8 100644
--- a/tests/ttk/image.test
+++ b/tests/ttk/image.test
@@ -1,7 +1,3 @@
-#
-# $Id: image.test,v 1.4 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test
index 1dd5573..28b4d2e 100644
--- a/tests/ttk/labelframe.test
+++ b/tests/ttk/labelframe.test
@@ -1,7 +1,3 @@
-#
-# $Id: labelframe.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/layout.test b/tests/ttk/layout.test
index 4b69b3c..814e1d9 100644
--- a/tests/ttk/layout.test
+++ b/tests/ttk/layout.test
@@ -1,7 +1,3 @@
-#
-# $Id: layout.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test
index b58efd7..cdce020 100644
--- a/tests/ttk/notebook.test
+++ b/tests/ttk/notebook.test
@@ -1,7 +1,3 @@
-#
-# $Id: notebook.test,v 1.5 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test
index 3bddbee..7fe5c87 100644
--- a/tests/ttk/panedwindow.test
+++ b/tests/ttk/panedwindow.test
@@ -1,7 +1,3 @@
-#
-# $Id: panedwindow.test,v 1.6 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test
index ead15f6..b9add86 100644
--- a/tests/ttk/progressbar.test
+++ b/tests/ttk/progressbar.test
@@ -1,7 +1,3 @@
-#
-# $Id: progressbar.test,v 1.1 2006/10/31 01:42:27 hobbs Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/radiobutton.test b/tests/ttk/radiobutton.test
index 5daf83a..ba02954 100644
--- a/tests/ttk/radiobutton.test
+++ b/tests/ttk/radiobutton.test
@@ -1,4 +1,3 @@
-# $Id: radiobutton.test,v 1.1 2008/12/31 23:10:48 jenglish Exp $
#
# ttk::radiobutton widget tests.
#
diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test
index 63c97b2..0464273 100644
--- a/tests/ttk/scrollbar.test
+++ b/tests/ttk/scrollbar.test
@@ -1,7 +1,3 @@
-#
-# $Id: scrollbar.test,v 1.3 2007/12/13 15:28:49 dgp Exp $
-#
-
package require Tk 8.5
package require tcltest ; namespace import -force tcltest::*
loadTestedCommands
diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test
index ed139a1..7f26e2f 100644
--- a/tests/ttk/treetags.test
+++ b/tests/ttk/treetags.test
@@ -1,6 +1,3 @@
-#
-# $Id: treetags.test,v 1.3 2010/03/28 21:43:25 jenglish Exp $
-#
package require Tk
package require tcltest ; namespace import -force tcltest::*
diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test
index 79d4b17..d8bc65d 100644
--- a/tests/ttk/treeview.test
+++ b/tests/ttk/treeview.test
@@ -1,6 +1,4 @@
#
-# $Id: treeview.test,v 1.8 2010/10/11 21:34:45 jenglish Exp $
-#
# [7Jun2005] TO CHECK: [$tv see {}] -- shouldn't work (at least, shouldn't do
# what it currently does)
#
diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test
index ddfaf84..def709e 100644
--- a/tests/ttk/ttk.test
+++ b/tests/ttk/ttk.test
@@ -6,6 +6,14 @@ loadTestedCommands
proc skip args {}
proc ok {} { return }
+variable widgetClasses {
+ button checkbutton radiobutton menubutton label entry
+ frame labelframe scrollbar
+ notebook progressbar combobox separator
+ panedwindow treeview sizegrip
+ scale
+}
+
proc bgerror {error} {
variable bgerror $error
variable bgerrorInfo $::errorInfo
@@ -62,10 +70,7 @@ test ttk-6.6 "Bad color spec in styles" -body {
} -result {unknown color name "badColor"}
test ttk-6.7 "Basic destruction test" -body {
- foreach widget {
- button checkbutton radiobutton sizegrip separator notebook
- progressbar panedwindow scrollbar
- } {
+ foreach widget $widgetClasses {
ttk::$widget .w
pack .w
destroy .w
@@ -214,6 +219,21 @@ test ttk-2.8 "bug 3223850: button state disabled during click" -setup {
unset -nocomplain ttk28 aid
} -result 1
+foreach wc $widgetClasses {
+ test ttk-coreoptions-$wc "$wc has all core options" -body {
+ ttk::$wc .w
+ foreach option {
+ -class
+ -style
+ -cursor
+ -takefocus
+ } {
+ .w cget $option
+ }
+ destroy .w
+ }
+}
+
# misc. error detection
test ttk-3.0 "Bad option" -body {
ttk::button .bad -badoption foo
@@ -555,6 +575,33 @@ test ttk-14.3 "-textvariable in nonexistant namespace" -body {
} -returnCodes 1 -result {can't trace *: parent namespace doesn't exist} \
-match glob -cleanup { destroy .tw }
+test ttk-15.1 {Bug 3062331} -setup {
+ destroy .b
+} -body {
+ set Y {}
+ ttk::button .b -textvariable Y
+ trace variable Y u "destroy .b; #"
+ unset Y
+} -cleanup {
+ destroy .b
+} -result {}
+
+test ttk-15.2 {Bug 3341056} -setup {
+ proc foo {} {
+ destroy .lf
+ ttk::labelframe .lf
+ ttk::checkbutton .lf.cb -text xxx
+ }
+} -body {
+ ttk::button .b -text xxx -command foo
+ .b invoke
+ .b invoke
+ .lf.cb invoke
+ destroy .b
+} -cleanup {
+ rename foo {}
+ destroy .lf
+} -result {}
## Test ensemble processing:
#
diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test
index 5ce2b13..bb88fef 100644
--- a/tests/ttk/vsapi.test
+++ b/tests/ttk/vsapi.test
@@ -1,5 +1,4 @@
# -*- tcl -*-
-# $Id: vsapi.test,v 1.1 2008/04/09 09:27:22 patthoyts Exp $
#
package require Tk 8.5
diff --git a/tests/unixButton.test b/tests/unixButton.test
index 5f50bbf..137ef33 100644
--- a/tests/unixButton.test
+++ b/tests/unixButton.test
@@ -7,8 +7,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: unixButton.test,v 1.9 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/unixEmbed.test b/tests/unixEmbed.test
index 1360a02..8aaa3c4 100644
--- a/tests/unixEmbed.test
+++ b/tests/unixEmbed.test
@@ -5,8 +5,6 @@
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: unixEmbed.test,v 1.15 2008/08/18 16:09:10 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/unixFont.test b/tests/unixFont.test
index bb694d8..27826d4 100644
--- a/tests/unixFont.test
+++ b/tests/unixFont.test
@@ -11,8 +11,6 @@
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: unixFont.test,v 1.11 2009/04/10 15:52:59 das Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/unixMenu.test b/tests/unixMenu.test
index e354006..3d655e4 100644
--- a/tests/unixMenu.test
+++ b/tests/unixMenu.test
@@ -6,8 +6,6 @@
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: unixMenu.test,v 1.11 2008/08/28 08:52:07 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -1274,4 +1272,4 @@ test unixMenu-26.1 {TkpMenuInit - nothing to do} -constraints unix -body {}
# cleanup
deleteWindows
cleanupTests
-return \ No newline at end of file
+return
diff --git a/tests/unixSelect.test b/tests/unixSelect.test
index d2bcf50..53ae006 100644
--- a/tests/unixSelect.test
+++ b/tests/unixSelect.test
@@ -8,8 +8,6 @@
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-#
-# RCS: @(#) $Id: unixSelect.test,v 1.12 2008/10/30 21:50:08 dgp Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 26b8a49..d579fc7 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: unixWm.test,v 1.48 2010/08/03 16:14:35 dgp Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/util.test b/tests/util.test
index 2741962..c1ec6a5 100644
--- a/tests/util.test
+++ b/tests/util.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: util.test,v 1.8 2008/08/16 23:52:34 aniap Exp $
package require tcltest 2.2
eval tcltest::configure $argv
diff --git a/tests/visual.test b/tests/visual.test
index 61f5001..2f5c34a 100644
--- a/tests/visual.test
+++ b/tests/visual.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: visual.test,v 1.11 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -569,4 +567,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/visual_bb.test b/tests/visual_bb.test
index 729a3fe..2b06d05 100644
--- a/tests/visual_bb.test
+++ b/tests/visual_bb.test
@@ -5,8 +5,6 @@
# with instructions about how the window should appear. You can look
# at the window to make sure it appears as expected. Individual tests
# are kept in separate ".tcl" files in this directory.
-#
-# RCS: @(#) $Id: visual_bb.test,v 1.9 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winButton.test b/tests/winButton.test
index cd5cf57..8bf1d01 100644
--- a/tests/winButton.test
+++ b/tests/winButton.test
@@ -7,8 +7,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winButton.test,v 1.14 2009/01/13 01:46:06 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winClipboard.test b/tests/winClipboard.test
index b5594b8..2a7ad73 100644
--- a/tests/winClipboard.test
+++ b/tests/winClipboard.test
@@ -9,8 +9,6 @@
# Copyright (c) 1997 by Sun Microsystems, Inc.
# Copyright (c) 1998-2000 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winClipboard.test,v 1.17 2008/11/03 22:02:12 patthoyts Exp $
package require tcltest 2.2
eval tcltest::configure $argv
@@ -121,4 +119,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/winDialog.test b/tests/winDialog.test
index 30649bf..c092e76 100644
--- a/tests/winDialog.test
+++ b/tests/winDialog.test
@@ -6,8 +6,6 @@
# Copyright (c) 1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Copyright (c) 1998-1999 ActiveState Corporation.
-#
-# RCS: @(#) $Id: winDialog.test,v 1.26 2010/01/05 21:50:54 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winFont.test b/tests/winFont.test
index 4491de0..8039426 100644
--- a/tests/winFont.test
+++ b/tests/winFont.test
@@ -9,8 +9,6 @@
# Copyright (c) 1996-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winFont.test,v 1.12 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winMenu.test b/tests/winMenu.test
index 813d4c5..ce2069f 100644
--- a/tests/winMenu.test
+++ b/tests/winMenu.test
@@ -6,8 +6,6 @@
# Copyright (c) 1995-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winMenu.test,v 1.11 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winMsgbox.test b/tests/winMsgbox.test
index e0dab81..0181103 100644
--- a/tests/winMsgbox.test
+++ b/tests/winMsgbox.test
@@ -1,8 +1,6 @@
# This file is a Tcl script to test the Windows specific message box
#
# Copyright (c) 2007 Pat Thoyts <patthoyts@users.sourceforge.net>
-#
-# RCS: @(#) $Id: winMsgbox.test,v 1.3 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -300,4 +298,3 @@ return
# mode: tcl
# indent-tabs-mode: nil
# End:
-
diff --git a/tests/winSend.test b/tests/winSend.test
index ee3990d..0f3baf8 100644
--- a/tests/winSend.test
+++ b/tests/winSend.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1996 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winSend.test,v 1.8 2008/07/23 23:24:24 nijtmans Exp $
package require tcltest 2.1
eval tcltest::configure $argv
diff --git a/tests/winWm.test b/tests/winWm.test
index 6b8fc81..a4d2669 100644
--- a/tests/winWm.test
+++ b/tests/winWm.test
@@ -8,8 +8,6 @@
# Copyright (c) 1996 by Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winWm.test,v 1.24 2009/09/30 22:52:32 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/window.test b/tests/window.test
index 981ba39b..876ba81 100644
--- a/tests/window.test
+++ b/tests/window.test
@@ -4,8 +4,6 @@
# Copyright (c) 1995 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: window.test,v 1.14 2008/12/29 16:29:43 das Exp $
package require tcltest 2.2
namespace import ::tcltest::*
diff --git a/tests/winfo.test b/tests/winfo.test
index aa221c0..14c2838 100644
--- a/tests/winfo.test
+++ b/tests/winfo.test
@@ -5,8 +5,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: winfo.test,v 1.17 2008/11/03 14:36:20 patthoyts Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -484,4 +482,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End:
diff --git a/tests/wm.test b/tests/wm.test
index b3e4cb6..1aa0779 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -6,8 +6,6 @@
# Copyright (c) 1994-1997 Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
-#
-# RCS: @(#) $Id: wm.test,v 1.49 2010/05/26 10:58:14 nijtmans Exp $
# This file tests window manager interactions that work across platforms.
# Window manager tests that only work on a specific platform should be placed
diff --git a/tests/xmfbox.test b/tests/xmfbox.test
index 896599f..f50329c 100644
--- a/tests/xmfbox.test
+++ b/tests/xmfbox.test
@@ -9,8 +9,6 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# Contributions from Don Porter, NIST, 2002. (not subject to US copyright)
# All rights reserved.
-#
-# RCS: @(#) $Id: xmfbox.test,v 1.11 2008/08/30 21:52:26 aniap Exp $
package require tcltest 2.2
namespace import ::tcltest::*
@@ -165,4 +163,4 @@ return
# Local variables:
# mode: tcl
-# End: \ No newline at end of file
+# End: