diff options
Diffstat (limited to 'tests')
33 files changed, 66 insertions, 49 deletions
diff --git a/tests/all.tcl b/tests/all.tcl index d15e5ca..3b6b75f 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -14,6 +14,7 @@ package require tcltest 2.2 tcltest::configure {*}$argv tcltest::configure -testdir [file normalize [file dirname [info script]]] tcltest::configure -loadfile \ - [file join [tcltest::testsDirectory] constraints.tcl] + [file join [tcltest::testsDirectory] constraints.tcl] tcltest::configure -singleproc 1 -tcltest::runAllTests +set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] +if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} diff --git a/tests/busy.test b/tests/busy.test index bc0ae5f..52bd4e6 100644 --- a/tests/busy.test +++ b/tests/busy.test @@ -6,7 +6,7 @@ # # Copyright (c) 1998-2000 by Jos Decoster. All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 tcltest::configure {*}$argv tcltest::loadTestedCommands namespace import -force tcltest::test diff --git a/tests/canvMoveto.test b/tests/canvMoveto.test index 60eb6f3..a6cf849 100644 --- a/tests/canvMoveto.test +++ b/tests/canvMoveto.test @@ -6,7 +6,7 @@ # Copyright (c) 2004 Neil McKay. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/canvas.test b/tests/canvas.test index 46c745a..ffdc775 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -7,7 +7,7 @@ # Copyright (c) 2008 Donal K. Fellows # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands imageInit diff --git a/tests/color.test b/tests/color.test index 2fd09d2..1e99a7d 100644 --- a/tests/color.test +++ b/tests/color.test @@ -5,7 +5,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/constraints.tcl b/tests/constraints.tcl index 9b48e8d..ee073cf 100644 --- a/tests/constraints.tcl +++ b/tests/constraints.tcl @@ -5,7 +5,7 @@ if {[namespace exists tk::test]} { return } -package require Tk 8.4 +package require Tk tk appname tktest wm title . tktest # If the main window isn't already mapped (e.g. because the tests are @@ -17,7 +17,7 @@ if {![winfo ismapped .]} { update } -package require tcltest 2.1 +package require tcltest 2.2 namespace eval tk { namespace eval test { diff --git a/tests/filebox.test b/tests/filebox.test index ee00160..514cbc7 100644 --- a/tests/filebox.test +++ b/tests/filebox.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/fontchooser.test b/tests/fontchooser.test index b16bdcc..97ca859 100644 --- a/tests/fontchooser.test +++ b/tests/fontchooser.test @@ -2,7 +2,7 @@ # # Copyright (c) 2008 Pat Thoyts -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/scrollbar.test b/tests/scrollbar.test index ea34f1d..3186f99 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/send.test b/tests/send.test index aad7032..9c4cf04 100644 --- a/tests/send.test +++ b/tests/send.test @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/textDisp.test b/tests/textDisp.test index b797715..dcc9318 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test diff --git a/tests/textIndex.test b/tests/textIndex.test index 6dc5e8f..99a70d6 100644 --- a/tests/textIndex.test +++ b/tests/textIndex.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands namespace import -force tcltest::test diff --git a/tests/ttk/all.tcl b/tests/ttk/all.tcl index f03cd56..a75172f 100644 --- a/tests/ttk/all.tcl +++ b/tests/ttk/all.tcl @@ -16,5 +16,5 @@ tcltest::configure -testdir [file normalize [file dirname [info script]]] tcltest::configure -loadfile \ [file join [file dirname [tcltest::testsDirectory]] constraints.tcl] tcltest::configure -singleproc 1 -tcltest::runAllTests - +set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] +if {[tcltest::runAllTests] && $ErrorOnFailures} {exit 1} diff --git a/tests/ttk/checkbutton.test b/tests/ttk/checkbutton.test index 5e929de..39a6e35 100644 --- a/tests/ttk/checkbutton.test +++ b/tests/ttk/checkbutton.test @@ -3,7 +3,8 @@ # package require Tk -package require tcltest ; namespace import -force tcltest::* +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test checkbutton-1.1 "Checkbutton check" -body { diff --git a/tests/ttk/combobox.test b/tests/ttk/combobox.test index c14db9b..ef77adb 100644 --- a/tests/ttk/combobox.test +++ b/tests/ttk/combobox.test @@ -2,8 +2,9 @@ # ttk::combobox widget tests # -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test combobox-1.0 "Combobox tests -- setup" -body { diff --git a/tests/ttk/entry.test b/tests/ttk/entry.test index f3174ae..5eb4740 100644 --- a/tests/ttk/entry.test +++ b/tests/ttk/entry.test @@ -2,8 +2,9 @@ # Tile package: entry widget tests # -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands variable scrollInfo diff --git a/tests/ttk/image.test b/tests/ttk/image.test index 5e48d5c..ea0ab1d 100644 --- a/tests/ttk/image.test +++ b/tests/ttk/image.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test image-1.1 "Bad image element" -body { diff --git a/tests/ttk/labelframe.test b/tests/ttk/labelframe.test index 6b4761f..1f64d67 100644 --- a/tests/ttk/labelframe.test +++ b/tests/ttk/labelframe.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test labelframe-1.0 "Setup" -body { diff --git a/tests/ttk/layout.test b/tests/ttk/layout.test index 52f44b4..5dfce9b 100644 --- a/tests/ttk/layout.test +++ b/tests/ttk/layout.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test layout-1.1 "Size computations for mixed-orientation layouts" -body { diff --git a/tests/ttk/notebook.test b/tests/ttk/notebook.test index ac63088..fbab6bd 100644 --- a/tests/ttk/notebook.test +++ b/tests/ttk/notebook.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test notebook-1.0 "Setup" -body { diff --git a/tests/ttk/panedwindow.test b/tests/ttk/panedwindow.test index ad2865c..9d3cf77 100644 --- a/tests/ttk/panedwindow.test +++ b/tests/ttk/panedwindow.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands proc propagate-geometry {} { update idletasks } diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test index 7c888c6..d3886e7 100644 --- a/tests/ttk/progressbar.test +++ b/tests/ttk/progressbar.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands diff --git a/tests/ttk/radiobutton.test b/tests/ttk/radiobutton.test index ba02954..09abcb8 100644 --- a/tests/ttk/radiobutton.test +++ b/tests/ttk/radiobutton.test @@ -3,7 +3,8 @@ # package require Tk -package require tcltest ; namespace import -force tcltest::* +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test radiobutton-1.1 "Radiobutton check" -body { diff --git a/tests/ttk/scrollbar.test b/tests/ttk/scrollbar.test index 443687a..a0d8065 100644 --- a/tests/ttk/scrollbar.test +++ b/tests/ttk/scrollbar.test @@ -1,5 +1,6 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands testConstraint coreScrollbar [expr {[tk windowingsystem] eq "aqua"}] diff --git a/tests/ttk/spinbox.test b/tests/ttk/spinbox.test index b5a9ab5..673f3bf 100644 --- a/tests/ttk/spinbox.test +++ b/tests/ttk/spinbox.test @@ -3,7 +3,8 @@ # package require Tk -package require tcltest ; namespace import -force tcltest::* +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands test spinbox-1.0 "Spinbox tests -- setup" -body { diff --git a/tests/ttk/treetags.test b/tests/ttk/treetags.test index fd3a0c5..0de6df5 100644 --- a/tests/ttk/treetags.test +++ b/tests/ttk/treetags.test @@ -1,6 +1,7 @@ package require Tk -package require tcltest ; namespace import -force tcltest::* +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands ### treeview tag invariants: diff --git a/tests/ttk/treeview.test b/tests/ttk/treeview.test index 4236b01..522e3a8 100644 --- a/tests/ttk/treeview.test +++ b/tests/ttk/treeview.test @@ -3,8 +3,9 @@ # what it currently does) # -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands # consistencyCheck -- diff --git a/tests/ttk/ttk.test b/tests/ttk/ttk.test index 53da18a..ec1a3b6 100644 --- a/tests/ttk/ttk.test +++ b/tests/ttk/ttk.test @@ -1,6 +1,7 @@ -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands proc skip args {} diff --git a/tests/ttk/validate.test b/tests/ttk/validate.test index 5755943..5430903 100644 --- a/tests/ttk/validate.test +++ b/tests/ttk/validate.test @@ -3,8 +3,8 @@ ## Derived from core test suite entry-19.1 through entry-19.20 ## -package require Tk 8.5 -package require tcltest 2.1 +package require Tk +package require tcltest 2.2 namespace import -force tcltest::* loadTestedCommands diff --git a/tests/ttk/vsapi.test b/tests/ttk/vsapi.test index 3966bd9..ec4e9e7 100644 --- a/tests/ttk/vsapi.test +++ b/tests/ttk/vsapi.test @@ -1,8 +1,9 @@ # -*- tcl -*- # -package require Tk 8.5 -package require tcltest ; namespace import -force tcltest::* +package require Tk +package require tcltest 2.2 +namespace import -force tcltest::* loadTestedCommands testConstraint xpnative \ diff --git a/tests/unixFont.test b/tests/unixFont.test index d7a989a..44e8f56 100644 --- a/tests/unixFont.test +++ b/tests/unixFont.test @@ -12,7 +12,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/winSend.test b/tests/winSend.test index 9286884..a72589f 100644 --- a/tests/winSend.test +++ b/tests/winSend.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands diff --git a/tests/wm.test b/tests/wm.test index a962b25..6d5e73b 100644 --- a/tests/wm.test +++ b/tests/wm.test @@ -11,7 +11,7 @@ # Window manager tests that only work on a specific platform should be placed # in unixWm.test or winWm.test. -package require tcltest 2.1 +package require tcltest 2.2 eval tcltest::configure $argv tcltest::loadTestedCommands |