From 5a6f5ee5a122ea026d28a8cb7f7f6e0c86aecbed Mon Sep 17 00:00:00 2001 From: aniap Date: Thu, 7 Aug 2008 23:05:15 +0000 Subject: Update to tcltest2 --- ChangeLog | 237 +++--- tests/canvPs.test | 40 +- tests/config.test | 2137 +++++++++++++++++++++++++++++++++++++++-------------- 3 files changed, 1745 insertions(+), 669 deletions(-) diff --git a/ChangeLog b/ChangeLog index b71151c..cea922e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-08-07 Ania Pawelczyk + + * test/canvPs.test: Update to tcltest2 + * test/config.test + 2008-08-05 Joe English * generic/tk.h, generic/tkEvent.c: Fix for [Bug 2010422] @@ -6,10 +11,10 @@ 2008-08-03 Ania Pawelczyk - * test/cmds.test: Update to tcltest2 - * test/dialog.test: Update to tcltest2 - * test/get.test: Update to tcltest2 - * test/text.test: Update to tcltest2; report: 33.11 fails + * test/cmds.test: Update to tcltest2 + * test/dialog.test + * test/get.test + * test/text.test: Update to tcltest2; report: 33.11 fails 2008-08-01 Pat Thoyts @@ -20,6 +25,16 @@ * generic/tk.h: Added missing EXTERN for the Tcl_PkgInitStubsCheck declaration to fix inability to embed non-stub-enabled Tk on Windows. +2008-07-29 Ania Pawelczyk + + * test/constraints.tcl: -highlightthickness entry's option + (fonts constraint) + + +2008-07-28 Ania Pawelczyk + + * test/cursor.test: Update to tcltest2 + * test/message.test 2008-07-26 Pat Thoyts @@ -33,6 +48,10 @@ * win/tkWinWindow.c: Check for 0x prefix in sprintf %p. Bug [2026405] +2008-07-25 Ania Pawelczyk + + * test/bind.test: Update to tcltest2 + 2007-02-24 Jan Nijtmans * generic/*.c: fix [2021443] inconsistant "wrong # args" messages @@ -42,6 +61,16 @@ * unix/tkUnixWm.c * tests/*.test +2008-07-22 Ania Pawelczyk + + * test/bell.test: Update to tcltest2 + * test/bgerror.test + * test/bitmap.test + * test/border.test + * test/button.test + * test/entry.test + * test/spinbox.test + 2008-07-22 Daniel Steffen * library/ttk/aquaTheme.tcl: Use system color names and TIP145 named @@ -137,7 +166,7 @@ * generic/tkCmds.c: During [tkwait] and [update], always cooperatively check for script cancellation. * win/makefile.vc: Added 'pdbs' option for Windows build rules to - * win/rules.vc: allow for non-debug builds with full symbols. + * win/rules.vc: allow for non-debug builds with full symbols. 2008-06-12 Daniel Steffen @@ -209,7 +238,7 @@ 2008-05-15 Pat Thoyts * win/makefile.vc: We should use the thread allocator for threaded - * win/rules.vc: builds. Added 'tclalloc' option to disable. + * win/rules.vc: builds. Added 'tclalloc' option to disable. 2008-05-14 Donal K. Fellows @@ -286,7 +315,7 @@ * win/ttkWinXpTheme.c: Provide a visual-styles API element engine * tests/ttk/vsapi.test: to permit scripts to create any available - * doc/ttk_vsapi.n: windows xp/vista element. Plus basic tests. + * doc/ttk_vsapi.n: windows xp/vista element. Plus basic tests. 2008-04-08 Daniel Steffen @@ -299,15 +328,15 @@ 2008-04-08 Kevin Kenny * tkWinEmbed.c: Removed #if 0 code. Trust the revision control system, - if you need it again, you can find it. + if you need it again, you can find it. * tkWinSend.c: Added conditional compilation to silence several - compiler warnings. + compiler warnings. 2008-04-07 Jeff Hobbs * generic/tkWindow.c (Initialize): Fix double-free on Tk_ParseArgv - * tests/main.test (main-3.*): error. [Bug 1937135] + * tests/main.test (main-3.*): error. [Bug 1937135] * generic/tkArgv.c: fix -help mem explosion. [Bug 1936238] (kenny) @@ -318,7 +347,7 @@ 2008-04-03 Pat Thoyts - * win/makefile.vc: Fixed stubs usage + * win/makefile.vc: Fixed stubs usage * library/ttk/xpTheme.tcl: fix the colour of labelframe in xp 2008-04-02 Daniel Steffen @@ -687,10 +716,10 @@ 2007-12-14 Pat Thoyts - * win/tkWinInt.h: Add in missing function definitions + * win/tkWinInt.h: Add in missing function definitions * win/tkWinButton.c: to support plain MSVC6 and use INT_PTR * win/tkWinScrlBar.c: rather than LONG_PTR which isn'tr defined - * win/tkWinWm.c: in the msvc6 headers. + * win/tkWinWm.c: in the msvc6 headers. 2007-12-14 Pat Thoyts @@ -718,7 +747,7 @@ * macosx/tkMacOSXWm.c (ApplyMasterOverrideChanges): Implement more * macosx/tkMacOSXMouseEvent.c (BringWindowForward): X11-like transient - * macosx/tkMacOSXSubwindows.c (XDestroyWindow): behaviour by + * macosx/tkMacOSXSubwindows.c (XDestroyWindow): behaviour by adding transient windows to a window group owned by the master window, this ensures transients always remain in front of and are collapsed with the master; bring master to front when selecting transient @@ -829,7 +858,7 @@ sh-200 for a more reasonable size. * win/tkWinButton.c, win/tkWinDialog.c: use SetWindowLongPtr and - * win/tkWinScrlbr.c, win/tkWinWm.c: GetWindowLongPtr only. + * win/tkWinScrlbr.c, win/tkWinWm.c: GetWindowLongPtr only. * win/ttkWinMonitor.c: * win/tkWinInt.h: remove CS_CLASSDC (not recommended for any apps now) @@ -1204,7 +1233,7 @@ 2007-10-31 Pat Thoyts - * win/rules.vc: Use -fp:strict with msvc8 as -fp:precise fails on + * win/rules.vc: Use -fp:strict with msvc8 as -fp:precise fails on * generic/tkObj.c: amd64 builds. Fix the two places in Tk that * generic/tkTrig.c: generate errors with msvc8 when using this flag. @@ -1275,9 +1304,9 @@ * library/demos/twind.tcl, library/demos/widget: Buh-bye Motif look * library/ttk/fonts.tcl: Update of Tk default look in 8.5 * macosx/tkMacOSXDefault.h: Trims border sizes, cleaner X11 look - * unix/tkUnixDefault.h: with minor modifications for Win32/Aqua. - * win/tkWinDefault.h: Uses Tk*Font definitions throughout for - * win/tkWinFont.c: classic widgets. [Bug 1820344] + * unix/tkUnixDefault.h: with minor modifications for Win32/Aqua. + * win/tkWinDefault.h: Uses Tk*Font definitions throughout for + * win/tkWinFont.c: classic widgets. [Bug 1820344] * library/obsolete.tcl (::tk::classic::restore): This restores changes made to defaults in 8.5 using the 'option' command, segmented into logical groups. @@ -1305,9 +1334,9 @@ * changes: Update changes for 8.5b2 release. - * doc/*.1: Revert doc changes that broke - * doc/*.3: `make html` so we can get the release - * doc/*.n: out the door. + * doc/*.1: Revert doc changes that broke + * doc/*.3: `make html` so we can get the release + * doc/*.n: out the door. * README: Bump version number to 8.5b2. * generic/tk.h: @@ -1551,11 +1580,11 @@ 2007-10-12 Pat Thoyts * win/makefile.vc: Mine all version information from headers. - * win/rules.vc: Sync tcl and tk and bring extension versions + * win/rules.vc: Sync tcl and tk and bring extension versions * win/nmakehlp.c: closer together. Try and avoid using tclsh - to do substitutions as we may cross compile. + to do substitutions as we may cross compile. - * library/console.tcl: Use TkFixedFont and ttk widgets + * library/console.tcl: Use TkFixedFont and ttk widgets 2007-10-12 Daniel Steffen @@ -1632,7 +1661,7 @@ [core-stabilizer-branch] - * README: Bump version number to 8.5.0 + * README: Bump version number to 8.5.0 * generic/tk.h: * library/tk.tcl: * unix/configure.in: Updated LOCALES. @@ -1690,7 +1719,7 @@ 2007-09-18 Pat Thoyts - * tests/all.tcl: Made ttk/all.tcl be the same as tk's all.tcl and + * tests/all.tcl: Made ttk/all.tcl be the same as tk's all.tcl and * tests/ttk/all.tcl: make use of file normalize (bugs noted by mjanssen and GPS with msys) @@ -1806,11 +1835,11 @@ 2007-09-04 Don Porter - * unix/Makefile.in: It's unreliable to count on the release + * unix/Makefile.in: It's unreliable to count on the release manager to remember to `make genstubs` before `make dist`. Let the Makefile remember the dependency for us. - * unix/Makefile.in: Corrections to `make dist` dependencies to be + * unix/Makefile.in: Corrections to `make dist` dependencies to be sure that macosx/configure gets generated whenever it does not exist. 2007-09-03 Daniel Steffen @@ -1853,7 +1882,7 @@ 2007-08-01 Pat Thoyts * win/tkWinDialog.c: Fix [Bug 1692927] (buffer length problems) - * win/tkWinTest.c: Added 'testfindwindow' and 'testgetwindowinfo' + * win/tkWinTest.c: Added 'testfindwindow' and 'testgetwindowinfo' and extended 'testwinevent' for WM_COMMAND support to enable testing native messagebox dialogs. * tests/winMsgbox.test: New Windows native messagebox tests. @@ -2232,10 +2261,10 @@ [core-stabilizer-branch] - * unix/configure: autoconf-2.59 (FC6 fork) + * unix/configure: autoconf-2.59 (FC6 fork) * win/configure: - * README: Bump version number to 8.5b1 + * README: Bump version number to 8.5b1 * generic/tk.h: * library/tk.tcl: * unix/configure.in: @@ -2252,10 +2281,10 @@ 2007-05-18 Don Porter - * unix/configure: autoconf-2.59 (FC6 fork) + * unix/configure: autoconf-2.59 (FC6 fork) * win/configure: - * README: Bump version number to 8.5a7 + * README: Bump version number to 8.5a7 * generic/tk.h: * library/tk.tcl: * unix/configure.in: @@ -2289,7 +2318,7 @@ * tests/canvImg.test: * tests/imgPhoto.test: - * tests/bind.test: Make test suite more SCIM-tolerant. [Bug 1609316] + * tests/bind.test: Make test suite more SCIM-tolerant. [Bug 1609316] 2007-05-16 Pat Thoyts @@ -2404,8 +2433,8 @@ 2007-05-04 Pat Thoyts - * generic/tkFont.c: TIP #145 implementation - - * generic/tkFont.h: Enhanced font handling. + * generic/tkFont.c: TIP #145 implementation - + * generic/tkFont.h: Enhanced font handling. * win/tkWinDefault.h: * win/tkWinFont.c: * win/tkWinInt.h: @@ -2870,7 +2899,7 @@ because Tk_MainEx() sets tcl_interactive before calling TkpInit(). * generic/ttk/ttkGenStubs.tcl (new): Add ttk-specific genstubs.tcl from - * unix/Makefile.in (genstubs): tile and run it from 'genstubs' + * unix/Makefile.in (genstubs): tile and run it from 'genstubs' target, restores ability to generate all of Tk's stub sources. * generic/ttk/ttkTreeview.c: #ifdef out unused declaration. @@ -3169,8 +3198,8 @@ 2006-12-06 Kevin Kenny * unix/configure.in: Further changes to avoid attempting to link - * unix/configure: against Xft libraries in a non-Xft build - [Bug 1609616] (dgp) + * unix/configure: against Xft libraries in a non-Xft build + [Bug 1609616] (dgp) 2006-12-04 Jeff Hobbs @@ -3352,9 +3381,9 @@ * library/safetk.tcl (::safe::tkTopLevel): Theme it. - * generic/ttk/ttkLayout.c: We do not want to require tkInt in all + * generic/ttk/ttkLayout.c: We do not want to require tkInt in all * generic/ttk/ttkMananager.h: the ttk files so added the definition - * generic/ttk/ttkTheme.h: of MODULE_SCOPE to ttkTheme.h. Ensures + * generic/ttk/ttkTheme.h: of MODULE_SCOPE to ttkTheme.h. Ensures * generic/ttk/ttkWinMonitor.c: everyone gets to see the definition from someplace. @@ -3409,7 +3438,7 @@ 2006-10-31 Pat Thoyts * win/makefile.vc: Added ttk files to msvc build and add manifest - * win/rules.vc: files to binaries with MSVC8. + * win/rules.vc: files to binaries with MSVC8. 2006-10-31 Daniel Steffen @@ -3501,7 +3530,7 @@ * generic/tkImgBmap.c: Fixed line endings. * win/makefile.vc: Patched up build system to manage - * win/rules.vc: AMD64 with MSVC8 + * win/rules.vc: AMD64 with MSVC8 * win/nmakehlp.c: Ensure operation without Platform SDK. 2006-10-18 Don Porter @@ -3544,7 +3573,7 @@ antialiasing to 0 as thin horizontal/vertical lines look good now. * macosx/README: document CG antialiasing limit changes. - * generic/tkCanvLine.c (ConfigureLine): on TkAqua, pass outline + * generic/tkCanvLine.c (ConfigureLine): on TkAqua, pass outline * generic/tkCanvPoly.c (ConfigurePolygon): linewidth in gc even for * generic/tkRectOval.c (ConfigureRectOval): fills (as it controls AA). @@ -3559,8 +3588,8 @@ 2006-10-08 Pat Thoyts * generic/tkWindow.c: Implemented TIP #264 - Tk_Interp function. - * doc/WindowId.3: Documented Tk_Interp. - * generic/tk.decls: Added to the stubs interface and + * doc/WindowId.3: Documented Tk_Interp. + * generic/tk.decls: Added to the stubs interface and * generic/tkDecls.h: regenerated. * generic/tkStubsInit.c: @@ -3583,7 +3612,7 @@ 2006-09-22 Andreas Kupries * generic/tkConsole.c: TIP #268 update regarding registered package - * generic/tkMain.c: version, now using full patchlevel instead of + * generic/tkMain.c: version, now using full patchlevel instead of * generic/tkWindow.c: major.minor * library/tk.tcl: * unix/configure: @@ -3635,11 +3664,11 @@ * library/text.tcl (aqua): remove focus bindings to set selection color * generic/tkTextBTree.c (TkTextIsElided): on TkAqua, don't show - * generic/tkTextDisp.c (GetStyle): inactive text selection when + * generic/tkTextDisp.c (GetStyle): inactive text selection when text widget is disabled. * generic/tkEntry.c (DisplayEntry): change default TkAqua selection - * macosx/tkMacOSXDefault.h: relief to "flat" (platform std). + * macosx/tkMacOSXDefault.h: relief to "flat" (platform std). * generic/tkText.c (CreateWidget): fix bug leading to default text selection relief string DEF_TEXT_SELECT_RELIEF being ignored. @@ -3672,10 +3701,10 @@ 2006-09-06 Jeff Hobbs * generic/tkEntry.c: move hard-coded ALWAYS_SHOW_SELECTION control - * generic/tkInt.h: of entry/text selection display based on focus - * generic/tkText.c: to the Tcl level, controlled by + * generic/tkInt.h: of entry/text selection display based on focus + * generic/tkText.c: to the Tcl level, controlled by * generic/tkWindow.c: ::tk::AlwaysShowSelection (boolean, private). - * library/tk.tcl: [Bug 1553691] + * library/tk.tcl: [Bug 1553691] * macosx/tkMacOSXDefault.h: * unix/tkUnixDefault.h: * unix/tkUnixPort.h: @@ -3765,14 +3794,14 @@ 2006-07-20 Daniel Steffen * macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support - * unix/tkUnixSend.c (Tk_GetUserInactiveTime): for weakly + * unix/tkUnixSend.c (Tk_GetUserInactiveTime): for weakly importing symbols not available on OSX 10.2 or 10.3, enables binaires built on later OSX versions to run on earlier ones. * macosx/Wish.xcodeproj/project.pbxproj: enable weak-linking; turn on - extra warnings. + extra warnings. * macosx/README: document how to enable weak-linking; cleanup. * unix/configure.in: add check on Darwin-X11 for ld support of -weak-l - * unix/tcl.m4: flag and weak-link libXss if possible as it is not + * unix/tcl.m4: flag and weak-link libXss if possible as it is not available before OSX 10.4; enforce requirement of OSX 10.2 for TkAqua; move Darwin specific checks & defines that are only relevant to the tcl build out of tcl.m4; restrict framework option to Darwin; clean up @@ -3785,10 +3814,10 @@ verify validity of context returned from QDBeginCGContext() before use. * macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr. - * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED - * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be + * macosx/tkMacOSXEvent.h: standardize MAC_OS_X_VERSION_MAX_ALLOWED + * macosx/tkMacOSXMenu.c: checks per QA1316, ensure define can be * macosx/tkMacOSXMenubutton.c: overridden on command line (from default - * macosx/tkMacOSXMenus.c: of current OS version). + * macosx/tkMacOSXMenus.c: of current OS version). * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXWm.c: @@ -3907,7 +3936,7 @@ region of unmapped windows to prevent any drawing into them or into their children from becoming visible. [Bug 940117] - * macosx/tkMacOSXInt.h: revert Jim's attempt of 2005-03-14 to + * macosx/tkMacOSXInt.h: revert Jim's attempt of 2005-03-14 to * macosx/tkMacOSXSubwindows.c: fix Bug 940117 as it disables Map/Unmap event propagation to children. [Bug 1480105] @@ -3923,11 +3952,11 @@ * macosx/tkMacOSXKeyEvent.c (TkMacOSXProcessKeyboardEvent): only check for HICommand menu item shortcuts in the application menu. - * macosx/tkMacOSXInt.h: initialize keyboard layout setup in - * macosx/tkMacOSXInit.c: TkpInit() rather than during handling of + * macosx/tkMacOSXInt.h: initialize keyboard layout setup in + * macosx/tkMacOSXInit.c: TkpInit() rather than during handling of * macosx/tkMacOSXKeyEvent.c: first key down event. - * macosx/tkMacOSXDraw.c: add optional debug code to flash clip + * macosx/tkMacOSXDraw.c: add optional debug code to flash clip * macosx/tkMacOSXSubwindows.c: regions during update or draw. 2006-05-04 Don Porter @@ -3956,10 +3985,10 @@ * macosx/tkMacOSXMouseEvent.c (XQueryPointer): implement return of window-local pointer position. - * macosx/tkMacOSXInt.h: use improvements above to avoid calls to + * macosx/tkMacOSXInt.h: use improvements above to avoid calls to * macosx/tkMacOSXKeyEvent.c: GlobalToLocal() when the current port - * macosx/tkMacOSXMenu.c: might not be set correctly. May fix [Bug - * macosx/tkMacOSXMenus.c: 1243318] + * macosx/tkMacOSXMenu.c: might not be set correctly. May fix [Bug + * macosx/tkMacOSXMenus.c: 1243318] * macosx/tkMacOSXScale.c: * macosx/tkMacOSXScrlbr.c: @@ -4016,7 +4045,7 @@ key binding for msgbox cancel buttons [Patch 1193614], whitespace. * macosx/tkMacOSXCarbonEvents.c: handle kEventCommandUpdateStatus - * macosx/tkMacOSXEvent.c: carbon event to dynamically enable + * macosx/tkMacOSXEvent.c: carbon event to dynamically enable the 'Preferences' app menu item when proc [::tk::mac::ShowPreferences] is defined. [Bug 700316] @@ -4028,13 +4057,13 @@ * macosx/tkMacOSXFont.c: remove #ifdef'd text measuring codepaths now * macosx/tkMacOSXInit.c: known to be incorrect, cleanup obsolete text - * macosx/README: antialiasing control code, document ATSUI text + * macosx/README: antialiasing control code, document ATSUI text antialiasing changes. - * macosx/tkMacOSXInt.h: Implemented 'zoomed' window state + * macosx/tkMacOSXInt.h: Implemented 'zoomed' window state * macosx/tkMacOSXWindowEvent.c: handling for TkAqua, via titlebar - * macosx/tkMacOSXWm.c: widget clicks as well as [wm state]. - * doc/wm.n: [Bug 1073456] + * macosx/tkMacOSXWm.c: widget clicks as well as [wm state]. + * doc/wm.n: [Bug 1073456] 2006-04-10 Donal K. Fellows @@ -4150,10 +4179,10 @@ 2006-03-28 Daniel Steffen - * macosx/Wish.xcode/default.pbxuser: add '-singleproc 1' cli arg to + * macosx/Wish.xcode/default.pbxuser: add '-singleproc 1' cli arg to * macosx/Wish.xcodeproj/default.pbxuser: tktest to ease test debugging. - * macosx/Wish.xcode/project.pbxproj: removed $prefix/share from + * macosx/Wish.xcode/project.pbxproj: removed $prefix/share from * macosx/Wish.xcodeproj/project.pbxproj: TCL_PACKAGE_PATH as per change to tcl/unix/configure.in of 2006-03-13. @@ -4198,8 +4227,8 @@ * macosx/tkMacOSXColor.c: [Patch 638966] into platform specific files. * macosx/tkMacOSXInt.h: - * macosx/tkMacOSX.h: Cleaned up & rationalized order of - * macosx/tkMacOSXBitmap.c: #includes of tk and carbon headers. + * macosx/tkMacOSX.h: Cleaned up & rationalized order of + * macosx/tkMacOSXBitmap.c: #includes of tk and carbon headers. * macosx/tkMacOSXButton.c: * macosx/tkMacOSXCarbonEvents.c: * macosx/tkMacOSXClipboard.c: @@ -4251,9 +4280,9 @@ 2006-03-21 Daniel Steffen - * generic/tkFont.c: implementation of ATSUI text rendering - * generic/tkInt.h: in TkAqua provided by Benjamin - * generic/tkTextDisp.c: Riefenstahl. [Patch 638966] + * generic/tkFont.c: implementation of ATSUI text rendering + * generic/tkInt.h: in TkAqua provided by Benjamin + * generic/tkTextDisp.c: Riefenstahl. [Patch 638966] * library/demos/unicodeout.tcl: * macosx/tkMacOSXFont.h (new file): * macosx/tkMacOSXFont.c: @@ -4261,17 +4290,17 @@ * unix/tkUnixFont.c: * win/tkWinFont.c: - * generic/tkFont.c: moved MODULE_SCOPE declarations of font - * generic/tkFont.h: helper procs into header files. + * generic/tkFont.c: moved MODULE_SCOPE declarations of font + * generic/tkFont.h: helper procs into header files. * macosx/tkMacOSXButton.c: * macosx/tkMacOSXFont.h: * macosx/tkMacOSXMenubutton.c: - * macosx/Wish.xcode/project.pbxproj: add new tkMacOSXFont.h file, + * macosx/Wish.xcode/project.pbxproj: add new tkMacOSXFont.h file, * macosx/Wish.xcodeproj/project.pbxproj: turn off dead code stripping as it interferes with -sectcreate (rdar://4486223). - * macosx/Wish.xcode/default.pbxuser: add TCLLIBPATH=/Library/Tcl + * macosx/Wish.xcode/default.pbxuser: add TCLLIBPATH=/Library/Tcl * macosx/Wish.xcodeproj/default.pbxuser: env var setting to tktest. * unix/configure.in: fix detection of symbols build when enabling @@ -4296,7 +4325,7 @@ * library/clrpick.tcl: Avoid using abbreviated sub-commands in core * library/palette.tcl: scripts as this can cause problems with - * library/scale.tcl: mega-widget libraries like snit. + * library/scale.tcl: mega-widget libraries like snit. * library/scrlbar.tcl: [Bug 1451587] * library/tkfbox.tcl: * library/xmfbox.tcl: @@ -4334,8 +4363,8 @@ * tests/scrollbar.test: Corrected several broken calls to [testmetrics] that were crashing the test suite. - * tests/constraints.tcl: Added notAqua constraint to canvPs-3.1 - * tests/canvPs.test: to stop test suite crash on Mac OSX. + * tests/constraints.tcl: Added notAqua constraint to canvPs-3.1 + * tests/canvPs.test: to stop test suite crash on Mac OSX. [Bug 1088807] * generic/tkCmds.c: Purged remaining references to errno, @@ -4382,13 +4411,13 @@ 2006-02-09 Daniel Steffen - * generic/tk.decls: fix signature of TkMacOSXInvalClipRgns - * generic/tkPlatDecls.h: to use Tk_Window instead of internal + * generic/tk.decls: fix signature of TkMacOSXInvalClipRgns + * generic/tkPlatDecls.h: to use Tk_Window instead of internal * macosx/tkMacOSXSubwindows.c: type TkWindow (which led to any include * macosx/tkMacOSXWindowEvent.c: of public header tkMacOSX.h requiring - * macosx/tkMacOSXWm.c: prior include of tkInt.h). + * macosx/tkMacOSXWm.c: prior include of tkInt.h). - * generic/tk.h: move TkAqua specific REDO_KEYSYM_LOOKUP define + * generic/tk.h: move TkAqua specific REDO_KEYSYM_LOOKUP define * macosx/tkMacOSXPort.h: out of tk.h into platform header. 2006-01-31 Donal K. Fellows @@ -4412,7 +4441,7 @@ 2006-01-23 Daniel Steffen - * unix/configure: minor fix to Darwin specific code removing + * unix/configure: minor fix to Darwin specific code removing * unix/configure.in: 64bit flags from CFLAGS for Tk build. 2006-01-20 Joe English @@ -4456,15 +4485,15 @@ * macosx/tkMacOSXInit.c: conditionalize 64bit-unsafe dyld code. * macosx/GNUmakefile: add 'wish8.x' symlink to SYMROOT. - * macosx/Wish.xcode/project.pbxproj: fix copy to tktest resource + * macosx/Wish.xcode/project.pbxproj: fix copy to tktest resource * macosx/Wish.xcodeproj/project.pbxproj: fork when zerolinked. - * macosx/Wish.xcode/default.pbxuser: add widget demo as argument to + * macosx/Wish.xcode/default.pbxuser: add widget demo as argument to * macosx/Wish.xcodeproj/default.pbxuser: executables (on by default). - * unix/configure: add caching, use AC_CACHE_CHECK instead of + * unix/configure: add caching, use AC_CACHE_CHECK instead of * unix/configure.in: AC_CACHE_VAL where possible, consistent message - * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes + * unix/tcl.m4: quoting, sync relevant tclconfig/tcl.m4 changes and gratuitous formatting differences, fix SC_CONFIG_MANPAGES with default argument, Darwin improvements to SC_LOAD_*CONFIG. @@ -4512,7 +4541,7 @@ 2005-12-09 Daniel Steffen * generic/tkInt.decls: Move all platform test sources from tk lib into - * generic/tkTest.c: tktest directly, removes requirement to export + * generic/tkTest.c: tktest directly, removes requirement to export * macosx/tkMacOSXTest.c:TkplatformtestInit from internal stubs table. * unix/Makefile.in: * win/Makefile.in: @@ -4524,14 +4553,14 @@ 2005-12-08 Jeff Hobbs - * win/tcl.m4: Add build support for Windows-x64 builds. + * win/tcl.m4: Add build support for Windows-x64 builds. * win/configure: --enable-64bit now accepts =amd64|ia64 for * win/Makefile.in: Windows 64-bit build variants (default: amd64) * win/makefile.vc: [Bug 1369597] (TKOBJS): add tkWinTest.obj to regular Tk obj for TkplatformtestInit * win/configure.in: Add CE build support (some C code fixes needed) - * win/wish.exe.manifest.in (new): manifest must map in MACHINE and + * win/wish.exe.manifest.in (new): manifest must map in MACHINE and * win/rc/wish.exe.manifest (removed): VERSION to be correct. * unix/Makefile.in: fix dist target for manifest dir change @@ -4830,7 +4859,7 @@ 2005-11-06 Pat Thoyts - * unix/tcl.m4: Fix SHLIB_LD_LIBS for building tclkit on OpenBSD. + * unix/tcl.m4: Fix SHLIB_LD_LIBS for building tclkit on OpenBSD. * unix/configure: regenerated 2005-10-31 Vince Darley @@ -4857,7 +4886,7 @@ 2005-10-14 Pat Thoyts - * win/tkWinSend.c: Avoid using tcl internal headers and fix to + * win/tkWinSend.c: Avoid using tcl internal headers and fix to * win/tkWinSendCom.h: correctly link on all types of build (was * win/tkWinSendCom.c: broken in static,msvcrt builds). @@ -4875,7 +4904,7 @@ properly alloc/delete one more option. [Bug 1319720] (melbardis) * macosx/tkMacOSXInt.h: Move MODULE_SCOPE defn to tkInt.h and add - * generic/tkInt.h: WORDS_BIGENDIAN checks that will work with OS X + * generic/tkInt.h: WORDS_BIGENDIAN checks that will work with OS X universal binary compiles. (steffen) * generic/tkMenu.c (TkSetWindowMenuBar): do not call TkMenuInit if the @@ -5148,8 +5177,8 @@ obsolete AppendResMenu() API. * macosx/tkMacOSXKeyEvent.c: replaced all direct uses of expensive - * macosx/tkMacOSXMenu.c: GetMouse() and TkMacOSXButtonKeyState() - * macosx/tkMacOSXMenus.c: APIs by calls to XQueryPointer() + * macosx/tkMacOSXMenu.c: GetMouse() and TkMacOSXButtonKeyState() + * macosx/tkMacOSXMenus.c: APIs by calls to XQueryPointer() * macosx/tkMacOSXMouseEvent.c: * macosx/tkMacOSXScale.c: * macosx/tkMacOSXScrlbr.c: @@ -5157,7 +5186,7 @@ * macosx/tkMacOSXDialog.c: replaced use of FrontNonFloatingWindow() * macosx/tkMacOSXKeyEvent.c: by ActiveNonFloatingWindow() as - * macosx/tkMacOSXMenu.c: recommended by Carbon docs. + * macosx/tkMacOSXMenu.c: recommended by Carbon docs. * macosx/tkMacOSXMenus.c: * macosx/tkMacOSXSubwindows.c: * macosx/tkMacOSXWm.c: @@ -5942,6 +5971,6 @@ caused crash in reinit of Tk (as seen in plugin). ****************************************************************** - *** CHANGELOG ENTRIES FOR 2004 AND 2003 IN "ChangeLog.2004" *** + *** CHANGELOG ENTRIES FOR 2004 AND 2003 IN "ChangeLog.2004" *** *** CHANGELOG ENTRIES FOR 2002 AND EARLIER IN "ChangeLog.2002" *** ****************************************************************** diff --git a/tests/canvPs.test b/tests/canvPs.test index 68c3b68..7b566e5 100644 --- a/tests/canvPs.test +++ b/tests/canvPs.test @@ -6,12 +6,14 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: canvPs.test,v 1.12 2006/03/14 05:01:48 dgp Exp $ +# RCS: @(#) $Id: canvPs.test,v 1.13 2008/08/07 23:05:15 aniap Exp $ -package require tcltest 2.1 +package require tcltest 2.2 +namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands +# canvas used in 1.* and 2.* test cases canvas .c -width 400 -height 300 -bd 2 -relief sunken .c create rectangle 20 20 80 80 -fill red pack .c @@ -45,6 +47,7 @@ test canvPs-1.2 {test writing to a file, idempotency} -constraints { removeFile bar.ps } -result ok + test canvPs-2.1 {test writing to a channel} -constraints { unixOrPc } -setup { @@ -77,7 +80,7 @@ test canvPs-2.2 {test writing to channel, idempotency} -constraints { close $c2 set status ok if {[file size $bar] != [file size $foo]} { - set status broken + set status broken } set status } -cleanup { @@ -99,7 +102,7 @@ test canvPs-2.3 {test writing to channel and file, same output} -constraints { .c postscript -file $bar set status ok if {[file size $foo] != [file size $bar]} { - set status broken + set status broken } set status } -cleanup { @@ -121,21 +124,22 @@ test canvPs-2.4 {test writing to channel and file, same output} -constraints { .c postscript -file $bar set status ok if {[file size $foo] != [file size $bar]} { - set status broken + set status broken } set status } -cleanup { removeFile foo.ps removeFile bar.ps } -result ok +destroy .c + -test canvPs-3.1 {test ps generation with an embedded window} -setup { +test canvPs-3.1 {test ps generation with an embedded window} -constraints { + notAqua +} -setup { set bar [makeFile {} bar.ps] file delete $bar -} -constraints { - notAqua } -body { - destroy .c pack [canvas .c -width 200 -height 200 -background white] .c create rect 20 20 150 150 -tags rect0 -dash . -width 2 .c create arc 0 50 200 200 -tags arc0 \ @@ -152,13 +156,13 @@ test canvPs-3.1 {test ps generation with an embedded window} -setup { .c postscript -file $bar file exists $bar } -cleanup { + destroy .c removeFile bar.ps -} -result 1 +} -result {1} test canvPs-3.2 {test ps generation with an embedded window not mapped} -setup { set bar [makeFile {} bar.ps] file delete $bar } -body { - destroy .c pack [canvas .c -width 200 -height 200 -background white] entry .c.e -background pink -foreground blue -width 14 .c.e insert 0 "we gonna be postscripted" @@ -166,15 +170,19 @@ test canvPs-3.2 {test ps generation with an embedded window not mapped} -setup { .c postscript -file $bar file exists $bar } -cleanup { + destroy .c removeFile bar.ps -} -result 1 +} -result {1} -test canvPs-4.1 {test ps generation with single-point uncolored poly, bug 734498} {} { - destroy .c + +test canvPs-4.1 {test ps generation with single-point uncolored poly, bug 734498} -body { pack [canvas .c] .c create poly 10 20 10 20 - catch {.c postscript} -} 0 + .c postscript +} -cleanup { + destroy .c +} -returnCodes ok -match glob -result * + # cleanup unset -nocomplain foo bar diff --git a/tests/config.test b/tests/config.test index f27bb8d..fca6d5c 100644 --- a/tests/config.test +++ b/tests/config.test @@ -6,9 +6,10 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: config.test,v 1.8 2004/06/17 22:38:57 dkf Exp $ +# RCS: @(#) $Id: config.test,v 1.9 2008/08/07 23:05:15 aniap Exp $ -package require tcltest 2.1 +package require tcltest 2.2 +namespace import ::tcltest::* eval tcltest::configure $argv tcltest::loadTestedCommands @@ -16,436 +17,1038 @@ proc killTables {} { # Note: it's important to delete chain2 before chain1, because # chain2 depends on chain1. If chain1 is deleted first, the # delete of chain2 will crash. - + deleteWindows foreach t {alltypes chain2 chain1 configerror internal new notenoughparams twowindows} { - while {[testobjconfig info $t] != ""} { - testobjconfig delete $t - } + while {[testobjconfig info $t] != ""} { + testobjconfig delete $t + } } } + +option clear +deleteWindows if {[testConstraint testobjconfig]} { killTables } -test config-1.1 {Tk_CreateOptionTable - reference counts} testobjconfig { - deleteWindows - killTables +test config-1.1 {Tk_CreateOptionTable - reference counts} -constraints { + testobjconfig +} -body { set x {} testobjconfig alltypes .a lappend x [testobjconfig info alltypes] testobjconfig alltypes .b lappend x [testobjconfig info alltypes] - deleteWindows set x -} {{1 16 -boolean} {2 16 -boolean}} -test config-1.2 {Tk_CreateOptionTable - synonym initialization} testobjconfig { - deleteWindows +} -cleanup { + killTables +} -result {{1 16 -boolean} {2 16 -boolean}} +test config-1.2 {Tk_CreateOptionTable - synonym initialization} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a -synonym green .a cget -color -} {green} -test config-1.3 {Tk_CreateOptionTable - option database initialization} testobjconfig { - deleteWindows - option clear +} -cleanup { + killTables +} -result {green} +test config-1.3 {Tk_CreateOptionTable - option database initialization} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a option add *b.string different testobjconfig alltypes .b list [.a cget -string] [.b cget -string] -} {foo different} -test config-1.4 {Tk_CreateOptionTable - option database initialization} testobjconfig { - deleteWindows +} -cleanup { + killTables option clear +} -result {foo different} +test config-1.4 {Tk_CreateOptionTable - option database initialization} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a option add *b.String bar testobjconfig alltypes .b list [.a cget -string] [.b cget -string] -} {foo bar} -test config-1.5 {Tk_CreateOptionTable - default initialization} testobjconfig { - deleteWindows +} -cleanup { + killTables + option clear +} -result {foo bar} +test config-1.5 {Tk_CreateOptionTable - default initialization} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a .a cget -relief -} {raised} -test config-1.6 {Tk_CreateOptionTable - chained tables} testobjconfig { - deleteWindows +} -cleanup { killTables +} -result {raised} +test config-1.6 {Tk_CreateOptionTable - chained tables} -constraints { + testobjconfig +} -body { testobjconfig chain1 .a testobjconfig chain2 .b testobjconfig info chain2 -} {1 4 -three 2 2 -one} -test config-1.7 {Tk_CreateOptionTable - chained tables} testobjconfig { - deleteWindows +} -cleanup { killTables +} -result {1 4 -three 2 2 -one} +test config-1.7 {Tk_CreateOptionTable - chained tables} -constraints { + testobjconfig +} -body { testobjconfig chain2 .b testobjconfig chain1 .a testobjconfig info chain2 -} {1 4 -three 2 2 -one} -test config-1.8 {Tk_CreateOptionTable - chained tables} testobjconfig { - deleteWindows +} -cleanup { + killTables +} -result {1 4 -three 2 2 -one} +test config-1.8 {Tk_CreateOptionTable - chained tables} -constraints { + testobjconfig +} -body { testobjconfig chain1 .a testobjconfig chain2 .b - list [catch {.a cget -four} msg] $msg [.a cget -one] \ - [.b cget -four] [.b cget -one] -} {1 {unknown option "-four"} one four one} - -test config-2.1 {Tk_DeleteOptionTable - reference counts} testobjconfig { - deleteWindows + .a cget -four +} -cleanup { killTables +} -returnCodes error -result {unknown option "-four"} +test config-1.9 {Tk_CreateOptionTable - chained tables} -constraints { + testobjconfig +} -body { + testobjconfig chain1 .a + testobjconfig chain2 .b + catch {.a cget -four} + list [.a cget -one] [.b cget -four] [.b cget -one] +} -cleanup { + killTables +} -result {one four one} + + +test config-2.1 {Tk_DeleteOptionTable - reference counts} -constraints { + testobjconfig +} -body { + set x {} testobjconfig chain1 .a testobjconfig chain2 .b testobjconfig chain2 .c deleteWindows - set x {} testobjconfig delete chain2 lappend x [testobjconfig info chain2] [testobjconfig info chain1] testobjconfig delete chain2 lappend x [testobjconfig info chain2] [testobjconfig info chain1] -} {{1 4 -three 2 2 -one} {2 2 -one} {} {1 2 -one}} +} -cleanup { + killTables +} -result {{1 4 -three 2 2 -one} {2 2 -one} {} {1 2 -one}} # No tests for DestroyOptionHashTable; couldn't figure out how to test. -test config-3.1 {Tk_InitOptions - priority of chained tables} testobjconfig { - deleteWindows +test config-3.1 {Tk_InitOptions - priority of chained tables} -constraints { + testobjconfig +} -body { testobjconfig chain1 .a testobjconfig chain2 .b list [.a cget -two] [.b cget -two] -} {two {two and a half}} -test config-3.2 {Tk_InitOptions - initialize from database} testobjconfig { - deleteWindows - option clear +} -cleanup { + killTables +} -result {two {two and a half}} +test config-3.2 {Tk_InitOptions - initialize from database} -constraints { + testobjconfig +} -body { option add *a.color blue testobjconfig alltypes .a list [.a cget -color] -} {blue} -test config-3.3 {Tk_InitOptions - initialize from database} testobjconfig { - deleteWindows +} -cleanup { + killTables option clear +} -result {blue} +test config-3.3 {Tk_InitOptions - initialize from database} -constraints { + testobjconfig +} -body { option add *a.justify bogus testobjconfig alltypes .a list [.a cget -justify] -} {left} -test config-3.4 {Tk_InitOptions - initialize from widget class} testobjconfig { - deleteWindows +} -cleanup { + killTables + option clear +} -result {left} +test config-3.4 {Tk_InitOptions - initialize from widget class} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a list [.a cget -color] -} {red} -test config-3.5 {Tk_InitOptions - no initial value} testobjconfig { - deleteWindows +} -cleanup { + killTables +} -result {red} +test config-3.5 {Tk_InitOptions - no initial value} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a .a cget -anchor -} {} -test config-3.6 {Tk_InitOptions - bad initial value} testobjconfig { - deleteWindows +} -cleanup { + killTables +} -result {} +test config-3.6 {Tk_InitOptions - bad initial value} -constraints { + testobjconfig +} -body { + option add *a.color non-existent + testobjconfig alltypes .a +} -cleanup { + killTables option clear +} -returnCodes error -result {unknown color name "non-existent"} +test config-3.7 {Tk_InitOptions - bad initial value} -constraints { + testobjconfig +} -body { option add *a.color non-existent - list [catch {testobjconfig alltypes .a} msg] $msg $errorInfo -} {1 {unknown color name "non-existent"} {unknown color name "non-existent" + catch {testobjconfig alltypes .a} + return $errorInfo +} -cleanup { + killTables + option clear +} -result {unknown color name "non-existent" (database entry for "-color" in widget ".a") invoked from within -"testobjconfig alltypes .a"}} -option clear -test config-3.7 {Tk_InitOptions - bad initial value} testobjconfig { - deleteWindows - list [catch {testobjconfig configerror} msg] $msg $errorInfo -} {1 {expected integer but got "bogus"} {expected integer but got "bogus" +"testobjconfig alltypes .a"} + +test config-3.8 {Tk_InitOptions - bad initial value} -constraints { + testobjconfig +} -body { + testobjconfig configerror +} -returnCodes error -result {expected integer but got "bogus"} +test config-3.9 {Tk_InitOptions - bad initial value} -constraints { + testobjconfig +} -body { + catch {testobjconfig configerror} + return $errorInfo +} -result {expected integer but got "bogus" (default value for "-int") invoked from within -"testobjconfig configerror"}} -option clear +"testobjconfig configerror"} -test config-4.1 {DoObjConfig - boolean} testobjconfig { +test config-4.1 {DoObjConfig - boolean} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -boolean 0 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.2 {DoObjConfig - boolean} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -boolean 0} msg] $msg [catch {.foo cget -boolean} result] $result [catch {rename .foo {}}] -} {0 .foo 0 0 0} -test config-4.2 {DoObjConfig - boolean} testobjconfig { +} -body { + testobjconfig alltypes .foo -boolean 0 + .foo cget -boolean +} -cleanup { + killTables +} -returnCodes ok -result {0} +test config-4.3 {DoObjConfig - boolean} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -boolean 0 + .foo cget -boolean + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.4 {DoObjConfig - boolean} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -boolean 1 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.5 {DoObjConfig - boolean} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -boolean 1 + .foo cget -boolean +} -cleanup { + killTables +} -returnCodes ok -result {1} +test config-4.6 {DoObjConfig - boolean} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -boolean 1} msg] $msg [catch {.foo cget -boolean} result] $result [catch {rename .foo {}}] -} {0 .foo 0 1 0} -test config-4.3 {DoObjConfig - invalid boolean} testobjconfig { +} -body { + testobjconfig alltypes .foo -boolean 1 + .foo cget -boolean + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.7 {DoObjConfig - invalid boolean} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -boolean {}} msg] $msg -} {1 {expected boolean value but got ""}} -test config-4.4 {DoObjConfig - boolean internal value} testobjconfig { +} -body { + testobjconfig alltypes .foo -boolean {} +} -cleanup { + killTables +} -returnCodes error -result {expected boolean value but got ""} +test config-4.8 {DoObjConfig - boolean internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -boolean 0 .foo cget -boolean -} {0} -test config-4.5 {DoObjConfig - integer} testobjconfig { +} -cleanup { + killTables +} -result {0} + +test config-4.9 {DoObjConfig - integer} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -integer 3} msg] $msg [catch {.foo cget -integer} result] $result [catch {rename .foo {}}] -} {0 .foo 0 3 0} -test config-4.6 {DoObjConfig - invalid integer} testobjconfig { +} -body { + testobjconfig alltypes .foo -integer 3 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.10 {DoObjConfig - integer} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -integer bar} msg] $msg -} {1 {expected integer but got "bar"}} -test config-4.7 {DoObjConfig - integer internal value} testobjconfig { +} -body { + testobjconfig alltypes .foo -integer 3 + .foo cget -integer +} -cleanup { + killTables +} -returnCodes ok -result {3} +test config-4.11 {DoObjConfig - integer} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -integer 3 + .foo cget -integer + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.12 {DoObjConfig - invalid integer} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -integer bar +} -cleanup { + killTables +} -cleanup { + killTables +} -returnCodes error -result {expected integer but got "bar"} +test config-4.13 {DoObjConfig - integer internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -integer 421 .foo cget -integer -} {421} -test config-4.8 {DoObjConfig - double} testobjconfig { +} -cleanup { + killTables +} -result {421} + +test config-4.14 {DoObjConfig - double} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -double 3.14} msg] $msg [catch {.foo cget -double} result] $result [catch {rename .foo {}}] -} {0 .foo 0 3.14 0} -test config-4.9 {DoObjConfig - invalid double} testobjconfig { +} -body { + testobjconfig alltypes .foo -double 3.14 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.15 {DoObjConfig - double} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -double bar} msg] $msg -} {1 {expected floating-point number but got "bar"}} -test config-4.10 {DoObjConfig - double internal value} testobjconfig { +} -body { + testobjconfig alltypes .foo -double 3.14 + .foo cget -double +} -cleanup { + killTables +} -returnCodes ok -result {3.14} +test config-4.16 {DoObjConfig - double} -constraints testobjconfig -setup { catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -double 3.14 + .foo cget -double + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.17 {DoObjConfig - invalid double} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -double bar +} -cleanup { + killTables +} -returnCodes error -result {expected floating-point number but got "bar"} +test config-4.18 {DoObjConfig - double internal value} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { testobjconfig internal .foo -double 62.75 .foo cget -double -} {62.75} -test config-4.11 {DoObjConfig - string} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -string test} msg] $msg [catch {.foo cget -string} result] $result [destroy .foo] -} {0 .foo 0 test {}} -test config-4.12 {DoObjConfig - null string} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -string {}} msg] $msg [catch {.foo cget -string} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.13 {DoObjConfig - string internal value} testobjconfig { +} -cleanup { + killTables +} -result {62.75} + +test config-4.19 {DoObjConfig - string} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string test +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.20 {DoObjConfig - string} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string test + .foo cget -string +} -cleanup { + killTables +} -returnCodes ok -result {test} +test config-4.21 {DoObjConfig - string} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string test + .foo cget -string + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.22 {DoObjConfig - null string} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.23 {DoObjConfig - null string} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string {} + .foo cget -string +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.24 {DoObjConfig - null string} -constraints testobjconfig -setup { catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -string {} + .foo cget -string + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok + +test config-4.25 {DoObjConfig - string internal value} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { testobjconfig internal .foo -string "this is a test" .foo cget -string -} {this is a test} -test config-4.14 {DoObjConfig - string table} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -stringtable two} msg] $msg [catch {.foo cget -stringtable} result] $result [destroy .foo] -} {0 .foo 0 two {}} -test config-4.15 {DoObjConfig - invalid string table} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -stringtable foo} msg] $msg -} {1 {bad stringtable "foo": must be one, two, three, or four}} -test config-4.16 {DoObjConfig - new string table} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {this is a test} + +test config-4.26 {DoObjConfig - string table} -constraints testobjconfig -body { + testobjconfig alltypes .foo -stringtable two +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.27 {DoObjConfig - string table} -constraints testobjconfig -body { + testobjconfig alltypes .foo -stringtable two + .foo cget -stringtable +} -cleanup { + killTables +} -returnCodes ok -result {two} +test config-4.28 {DoObjConfig - string table} -constraints testobjconfig -body { testobjconfig alltypes .foo -stringtable two - list [catch {.foo configure -stringtable three} msg] $msg [catch {.foo cget -stringtable} result] $result [destroy .foo] -} {0 16 0 three {}} -test config-4.17 {DoObjConfig - stringtable internal value} testobjconfig { + .foo cget -stringtable + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.29 {DoObjConfig - invalid string table} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -stringtable foo +} -cleanup { + killTables +} -returnCodes error -result {bad stringtable "foo": must be one, two, three, or four} + +test config-4.30 {DoObjConfig - new string table} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -stringtable two + .foo configure -stringtable three +} -cleanup { + killTables +} -returnCodes ok -result {16} +test config-4.31 {DoObjConfig - new string table} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -stringtable two + .foo configure -stringtable three + .foo cget -stringtable +} -cleanup { + killTables +} -returnCodes ok -result {three} +test config-4.32 {DoObjConfig - new string table} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -stringtable two + .foo configure -stringtable three + .foo cget -stringtable + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.33 {DoObjConfig - stringtable internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -stringtable "four" .foo cget -stringtable -} {four} -test config-4.18 {DoObjConfig - color} testobjconfig { - catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -color blue} msg] $msg [catch {.foo cget -color} result] $result [destroy .foo] -} {0 .foo 0 blue {}} -test config-4.19 {DoObjConfig - invalid color} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -color xxx} msg] $msg -} {1 {unknown color name "xxx"}} -test config-4.20 {DoObjConfig - color internal value} testobjconfig { +} -cleanup { + killTables +} -result {four} + +test config-4.34 {DoObjConfig - color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color blue +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.35 {DoObjConfig - color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color blue + .foo cget -color +} -cleanup { + killTables +} -returnCodes ok -result {blue} +test config-4.36 {DoObjConfig - color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color blue + .foo cget -color + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.37 {DoObjConfig - invalid color} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -color xxx +} -cleanup { + killTables +} -returnCodes error -result {unknown color name "xxx"} +test config-4.38 {DoObjConfig - color internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -color purple .foo cget -color -} {purple} -test config-4.21 {DoObjConfig - null color} testobjconfig { - catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -color {}} msg] $msg [catch {.foo cget -color} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.22 {DoObjConfig - getting rid of old color} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {purple} + +test config-4.39 {DoObjConfig - null color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.40 {DoObjConfig - null color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color {} + .foo cget -color +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.41 {DoObjConfig - null color} -constraints testobjconfig -body { + testobjconfig alltypes .foo -color {} + .foo cget -color + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok +test config-4.42 {DoObjConfig - getting rid of old color} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo -color #333333 - list [catch {.foo configure -color #444444} msg] $msg [catch {.foo cget -color} result] $result [destroy .foo] -} {0 32 0 #444444 {}} -test config-4.23 {DoObjConfig - font} testobjconfig { + .foo configure -color #444444 +} -cleanup { + killTables +} -returnCodes ok -result {32} +test config-4.43 {DoObjConfig - getting rid of old color} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -color #333333 + .foo configure -color #444444 + .foo cget -color +} -cleanup { + killTables +} -returnCodes ok -result {#444444} +test config-4.44 {DoObjConfig - getting rid of old color} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -color #333333 + .foo configure -color #444444 + .foo cget -color + rename .foo {} +} -cleanup { + killTables +} -returnCodes ok + +test config-4.45 {DoObjConfig - font} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -font {Helvetica 72} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.46 {DoObjConfig - font} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -font {Helvetica 72}} msg] $msg [catch {.foo cget -font} result] $result [destroy .foo] -} {0 .foo 0 {Helvetica 72} {}} -test config-4.24 {DoObjConfig - new font} testobjconfig { +} -body { + testobjconfig alltypes .foo -font {Helvetica 72} + .foo cget -font +} -cleanup { + killTables +} -returnCodes ok -result {Helvetica 72} +test config-4.47 {DoObjConfig - new font} -constraints testobjconfig -setup { catch {rename .foo {}} +} -body { testobjconfig alltypes .foo -font {Courier 12} - list [catch {.foo configure -font {Helvetica 72}} msg] $msg [catch {.foo cget -font} result] $result [destroy .foo] -} {0 64 0 {Helvetica 72} {}} -test config-4.25 {DoObjConfig - invalid font} testobjconfig { + .foo configure -font {Helvetica 72} +} -cleanup { + killTables +} -returnCodes ok -result {64} +test config-4.48 {DoObjConfig - new font} -constraints testobjconfig -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -font {Helvetica 12 foo}} msg] $msg -} {1 {unknown font style "foo"}} -test config-4.26 {DoObjConfig - null font} testobjconfig { +} -body { + testobjconfig alltypes .foo -font {Courier 12} + .foo configure -font {Helvetica 72} + .foo cget -font +} -cleanup { + killTables +} -returnCodes ok -result {Helvetica 72} +test config-4.49 {DoObjConfig - invalid font} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -font {}} msg] $msg [catch {.foo cget -font} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.27 {DoObjConfig - font internal value} testobjconfig { +} -body { + testobjconfig alltypes .foo -font {Helvetica 12 foo} +} -cleanup { + killTables +} -returnCodes error -result {unknown font style "foo"} +test config-4.50 {DoObjConfig - null font} -constraints testobjconfig -setup { catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -font {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.51 {DoObjConfig - null font} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -font {} + .foo cget -font +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.52 {DoObjConfig - font internal value} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { testobjconfig internal .foo -font {Times 16} .foo cget -font -} {Times 16} -test config-4.28 {DoObjConfig - bitmap} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -bitmap gray75} msg] $msg [catch {.foo cget -bitmap} result] $result [destroy .foo] -} {0 .foo 0 gray75 {}} -test config-4.29 {DoObjConfig - new bitmap} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {Times 16} + +test config-4.53 {DoObjConfig - bitmap} -constraints testobjconfig -body { + testobjconfig alltypes .foo -bitmap gray75 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.54 {DoObjConfig - bitmap} -constraints testobjconfig -body { testobjconfig alltypes .foo -bitmap gray75 - list [catch {.foo configure -bitmap gray50} msg] $msg [catch {.foo cget -bitmap} result] $result [destroy .foo] -} {0 128 0 gray50 {}} -test config-4.30 {DoObjConfig - invalid bitmap} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -bitmap foo} msg] $msg -} {1 {bitmap "foo" not defined}} -test config-4.31 {DoObjConfig - null bitmap} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -bitmap {}} msg] $msg [catch {.foo cget -bitmap} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.32 {DoObjConfig - bitmap internal value} testobjconfig { + .foo cget -bitmap +} -cleanup { + killTables +} -returnCodes ok -result {gray75} +test config-4.55 {DoObjConfig - new bitmap} -constraints testobjconfig -body { + testobjconfig alltypes .foo -bitmap gray75 + .foo configure -bitmap gray50 +} -cleanup { + killTables +} -returnCodes ok -result {128} +test config-4.56 {DoObjConfig - new bitmap} -constraints testobjconfig -body { + testobjconfig alltypes .foo -bitmap gray75 + .foo configure -bitmap gray50 + .foo cget -bitmap +} -cleanup { + killTables +} -returnCodes ok -result {gray50} +test config-4.57 {DoObjConfig - invalid bitmap} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -bitmap foo +} -cleanup { + killTables +} -returnCodes error -result {bitmap "foo" not defined} +test config-4.58 {DoObjConfig - null bitmap} -constraints testobjconfig -body { + testobjconfig alltypes .foo -bitmap {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.59 {DoObjConfig - null bitmap} -constraints testobjconfig -body { + testobjconfig alltypes .foo -bitmap {} + .foo cget -bitmap +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.60 {DoObjConfig - bitmap internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -bitmap gray25 .foo cget -bitmap -} {gray25} -test config-4.33 {DoObjConfig - border} testobjconfig { - catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -border green} msg] $msg [catch {.foo cget -border} result] $result [destroy .foo] -} {0 .foo 0 green {}} -test config-4.34 {DoObjConfig - invalid border} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -border xxx} msg] $msg -} {1 {unknown color name "xxx"}} -test config-4.35 {DoObjConfig - null border} testobjconfig { - catch {rename .foo {}} - list [catch {testobjconfig alltypes .foo -border {}} msg] $msg [catch {.foo cget -border} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.36 {DoObjConfig - border internal value} testobjconfig { +} -cleanup { + killTables +} -result {gray25} + +test config-4.61 {DoObjConfig - border} -constraints testobjconfig -body { + testobjconfig alltypes .foo -border green +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.62 {DoObjConfig - border} -constraints testobjconfig -body { + testobjconfig alltypes .foo -border green + .foo cget -border +} -cleanup { + killTables +} -returnCodes ok -result {green} +test config-4.63 {DoObjConfig - invalid border} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -border xxx +} -cleanup { + killTables +} -returnCodes error -result {unknown color name "xxx"} +test config-4.64 {DoObjConfig - null border} -constraints testobjconfig -body { + testobjconfig alltypes .foo -border {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.65 {DoObjConfig - null border} -constraints testobjconfig -body { + testobjconfig alltypes .foo -border {} + .foo cget -border +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.66 {DoObjConfig - border internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -border #123456 .foo cget -border -} {#123456} -test config-4.37 {DoObjConfig - getting rid of old border} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {#123456} +test config-4.67 {DoObjConfig - getting rid of old border} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo -border #333333 - list [catch {.foo configure -border #444444} msg] $msg [catch {.foo cget -border} result] $result [destroy .foo] -} {0 256 0 #444444 {}} -test config-4.38 {DoObjConfig - relief} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -relief flat} msg] $msg [catch {.foo cget -relief} result] $result [destroy .foo] -} {0 .foo 0 flat {}} -test config-4.39 {DoObjConfig - invalid relief} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -relief foo} msg] $msg -} {1 {bad relief "foo": must be flat, groove, raised, ridge, solid, or sunken}} -test config-4.40 {DoObjConfig - new relief} testobjconfig { - catch {destroy .foo} - testobjconfig alltypes .foo -relief raised - list [catch {.foo configure -relief flat} msg] $msg [catch {.foo cget -relief} result] $result [destroy .foo] -} {0 512 0 flat {}} -test config-4.41 {DoObjConfig - relief internal value} testobjconfig { + .foo configure -border #444444 +} -cleanup { + killTables +} -returnCodes ok -result {256} +test config-4.68 {DoObjConfig - getting rid of old border} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -border #333333 + .foo configure -border #444444 + .foo cget -border +} -cleanup { + killTables +} -returnCodes ok -result {#444444} + +test config-4.69 {DoObjConfig - relief} -constraints testobjconfig -body { + testobjconfig alltypes .foo -relief flat +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.70 {DoObjConfig - relief} -constraints testobjconfig -body { + testobjconfig alltypes .foo -relief flat + .foo cget -relief +} -cleanup { + killTables +} -returnCodes ok -result {flat} +test config-4.71 {DoObjConfig - invalid relief} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -relief foo +} -cleanup { + killTables +} -returnCodes error -result {bad relief "foo": must be flat, groove, raised, ridge, solid, or sunken} +test config-4.72 {DoObjConfig - relief internal value} -constraints testobjconfig -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -relief ridge .foo cget -relief -} {ridge} -test config-4.42 {DoObjConfig - cursor} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -cursor arrow} msg] $msg [catch {.foo cget -cursor} result] $result [destroy .foo] -} {0 .foo 0 arrow {}} -test config-4.43 {DoObjConfig - invalid cursor} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -cursor foo} msg] $msg -} {1 {bad cursor spec "foo"}} -test config-4.44 {DoObjConfig - null cursor} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -cursor {}} msg] $msg [catch {.foo cget -cursor} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.45 {DoObjConfig - new cursor} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {ridge} +test config-4.73 {DoObjConfig - new relief} -constraints testobjconfig -body { + testobjconfig alltypes .foo -relief raised + .foo configure -relief flat +} -cleanup { + killTables +} -returnCodes ok -result {512} +test config-4.74 {DoObjConfig - new relief} -constraints testobjconfig -body { + testobjconfig alltypes .foo -relief raised + .foo configure -relief flat + .foo cget -relief +} -cleanup { + killTables +} -returnCodes ok -result {flat} + +test config-4.75 {DoObjConfig - cursor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -cursor arrow +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.76 {DoObjConfig - cursor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -cursor arrow + .foo cget -cursor +} -cleanup { + killTables +} -returnCodes ok -result {arrow} +test config-4.77 {DoObjConfig - invalid cursor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -cursor foo +} -cleanup { + killTables +} -returnCodes error -result {bad cursor spec "foo"} +test config-4.78 {DoObjConfig - null cursor} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -cursor {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.79 {DoObjConfig - null cursor} -constraints testobjconfig -setup { + catch {rename .foo {}} +} -body { + testobjconfig alltypes .foo -cursor {} + .foo cget -cursor +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.80 {DoObjConfig - new cursor} -constraints testobjconfig -body { testobjconfig alltypes .foo -cursor xterm - list [catch {.foo configure -cursor arrow} msg] $msg [catch {.foo cget -cursor} result] $result [destroy .foo] -} {0 1024 0 arrow {}} -test config-4.46 {DoObjConfig - cursor internal value} testobjconfig { + .foo configure -cursor arrow +} -cleanup { + killTables +} -returnCodes ok -result {1024} +test config-4.81 {DoObjConfig - new cursor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -cursor xterm + .foo configure -cursor arrow + .foo cget -cursor +} -cleanup { + killTables +} -returnCodes ok -result {arrow} +test config-4.82 {DoObjConfig - cursor internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -cursor watch .foo cget -cursor -} {watch} -test config-4.47 {DoObjConfig - justify} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -justify center} msg] $msg [catch {.foo cget -justify} result] $result [destroy .foo] -} {0 .foo 0 center {}} -test config-4.48 {DoObjConfig - invalid justify} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -justify foo} msg] $msg -} {1 {bad justification "foo": must be left, right, or center}} -test config-4.49 {DoObjConfig - new justify} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {watch} + +test config-4.83 {DoObjConfig - justify} -constraints testobjconfig -body { + testobjconfig alltypes .foo -justify center +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.84 {DoObjConfig - justify} -constraints testobjconfig -body { + testobjconfig alltypes .foo -justify center + .foo cget -justify +} -cleanup { + killTables +} -returnCodes ok -result {center} +test config-4.85 {DoObjConfig - invalid justify} -constraints testobjconfig -body { + testobjconfig alltypes .foo -justify foo +} -cleanup { + killTables +} -returnCodes error -result {bad justification "foo": must be left, right, or center} +test config-4.86 {DoObjConfig - new justify} -constraints testobjconfig -body { testobjconfig alltypes .foo -justify left - list [catch {.foo configure -justify right} msg] $msg [catch {.foo cget -justify} result] $result [destroy .foo] -} {0 2048 0 right {}} -test config-4.50 {DoObjConfig - justify internal value} testobjconfig { + .foo configure -justify right +} -cleanup { + killTables +} -returnCodes ok -result {2048} +test config-4.87 {DoObjConfig - new justify} -constraints testobjconfig -body { + testobjconfig alltypes .foo -justify left + .foo configure -justify right + .foo cget -justify +} -cleanup { + killTables +} -returnCodes ok -result {right} +test config-4.88 {DoObjConfig - justify internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -justify center .foo cget -justify -} {center} -test config-4.51 {DoObjConfig - anchor} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -anchor center} msg] $msg [catch {.foo cget -anchor} result] $result [destroy .foo] -} {0 .foo 0 center {}} -test config-4.52 {DoObjConfig - invalid anchor} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -anchor foo} msg] $msg -} {1 {bad anchor "foo": must be n, ne, e, se, s, sw, w, nw, or center}} -test config-4.53 {DoObjConfig - new anchor} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {center} + +test config-4.89 {DoObjConfig - anchor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -anchor center +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.90 {DoObjConfig - anchor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -anchor center + .foo cget -anchor +} -cleanup { + killTables +} -returnCodes ok -result {center} +test config-4.91 {DoObjConfig - invalid anchor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -anchor foo +} -cleanup { + killTables +} -returnCodes error -result {bad anchor "foo": must be n, ne, e, se, s, sw, w, nw, or center} +test config-4.92 {DoObjConfig - new anchor} -constraints testobjconfig -body { testobjconfig alltypes .foo -anchor e - list [catch {.foo configure -anchor n} msg] $msg [catch {.foo cget -anchor} result] $result [destroy .foo] -} {0 4096 0 n {}} -test config-4.54 {DoObjConfig - anchor internal value} testobjconfig { + .foo configure -anchor n +} -cleanup { + killTables +} -returnCodes ok -result {4096} +test config-4.93 {DoObjConfig - new anchor} -constraints testobjconfig -body { + testobjconfig alltypes .foo -anchor e + .foo configure -anchor n + .foo cget -anchor +} -cleanup { + killTables +} -returnCodes ok -result {n} +test config-4.94 {DoObjConfig - anchor internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -anchor sw .foo cget -anchor -} {sw} -test config-4.55 {DoObjConfig - pixel} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -pixel 42} msg] $msg [catch {.foo cget -pixel} result] $result [destroy .foo] -} {0 .foo 0 42 {}} -test config-4.56 {DoObjConfig - invalid pixel} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -pixel foo} msg] $msg -} {1 {bad screen distance "foo"}} -test config-4.57 {DoObjConfig - new pixel} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {sw} +test config-4.95 {DoObjConfig - pixel} -constraints testobjconfig -body { + testobjconfig alltypes .foo -pixel 42 +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.96 {DoObjConfig - pixel} -constraints testobjconfig -body { + testobjconfig alltypes .foo -pixel 42 + .foo cget -pixel +} -cleanup { + killTables +} -returnCodes ok -result {42} +test config-4.97 {DoObjConfig - invalid pixel} -constraints testobjconfig -body { + testobjconfig alltypes .foo -pixel foo +} -cleanup { + killTables +} -returnCodes error -result {bad screen distance "foo"} +test config-4.98 {DoObjConfig - new pixel} -constraints testobjconfig -body { + testobjconfig alltypes .foo -pixel 42m + .foo configure -pixel 3c +} -cleanup { + killTables +} -returnCodes ok -result {8192} +test config-4.99 {DoObjConfig - new pixel} -constraints testobjconfig -body { testobjconfig alltypes .foo -pixel 42m - list [catch {.foo configure -pixel 3c} msg] $msg [catch {.foo cget -pixel} result] $result [destroy .foo] -} {0 8192 0 3c {}} -test config-4.58 {DoObjConfig - pixel internal value} testobjconfig { + .foo configure -pixel 3c + .foo cget -pixel +} -cleanup { + killTables +} -returnCodes ok -result {3c} +test config-4.100 {DoObjConfig - pixel internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -pixel [winfo screenmmwidth .]m - .foo cget -pixel -} [winfo screenwidth .] -test config-4.59 {DoObjConfig - window} testobjconfig { - catch {destroy .foo} - catch {destroy .bar} + set screenW [winfo screenwidth .] + set result [.foo cget -pixel] + expr {$screenW eq $result} +} -cleanup { + killTables +} -result {1} + +test config-4.101 {DoObjConfig - window} -constraints testobjconfig -body { toplevel .bar - list [catch {testobjconfig twowindows .foo -window .bar} msg] $msg [catch {.foo cget -window} result] $result [destroy .foo] [destroy .bar] -} {0 .foo 0 .bar {} {}} -test config-4.60 {DoObjConfig - invalid window} testobjconfig { - catch {destroy .foo} + testobjconfig twowindows .foo -window .bar +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.102 {DoObjConfig - window} -constraints testobjconfig -body { toplevel .bar - list [catch {testobjconfig twowindows .foo -window foo} msg] $msg [destroy .bar] -} {1 {bad window path name "foo"} {}} -test config-4.61 {DoObjConfig - null window} testobjconfig { - catch {destroy .foo} - catch {destroy .bar} + testobjconfig twowindows .foo -window .bar + .foo cget -window +} -cleanup { + killTables +} -returnCodes ok -result {.bar} +test config-4.103 {DoObjConfig - invalid window} -constraints testobjconfig -body { toplevel .bar - list [catch {testobjconfig twowindows .foo -window {}} msg] $msg [catch {.foo cget -window} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.62 {DoObjConfig - new window} testobjconfig { - catch {destroy .foo} - catch {destroy .bar} - catch {destroy .blamph} + testobjconfig twowindows .foo -window foo +} -cleanup { + killTables +} -returnCodes error -result {bad window path name "foo"} +test config-4.104 {DoObjConfig - null window} -constraints testobjconfig -body { + toplevel .bar + testobjconfig twowindows .foo -window {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.105 {DoObjConfig - null window} -constraints testobjconfig -body { + toplevel .bar + testobjconfig twowindows .foo -window {} + .foo cget -window +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.106 {DoObjConfig - new window} -constraints testobjconfig -body { toplevel .bar toplevel .blamph testobjconfig twowindows .foo -window .bar - list [catch {.foo configure -window .blamph} msg] $msg [catch {.foo cget -window} result] $result [destroy .foo] [destroy .bar] [destroy .blamph] -} {0 0 0 .blamph {} {} {}} -test config-4.63 {DoObjConfig - window internal value} testobjconfig { + .foo configure -window .blamph +} -cleanup { + killTables +} -returnCodes ok -result {0} +test config-4.107 {DoObjConfig - new window} -constraints testobjconfig -body { + toplevel .bar + toplevel .blamph + testobjconfig twowindows .foo -window .bar + .foo configure -window .blamph + .foo cget -window +} -cleanup { + killTables +} -returnCodes ok -result {.blamph} +test config-4.108 {DoObjConfig - window internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -window . .foo cget -window -} {.} -test config-4.64 {DoObjConfig - releasing old values} testobjconfig { +} -cleanup { + killTables +} -result {.} + +test config-4.109 {DoObjConfig - releasing old values} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { # This test doesn't generate a useful value to check; if an # error occurs, it will be detected only by memory checking software # such as Purify or Tcl's built-in checker. - catch {rename .foo {}} testobjconfig alltypes .foo -string {Test string} -color yellow \ -font {Courier 18} -bitmap questhead -border green -cursor cross \ -custom foobar @@ -453,13 +1056,18 @@ test config-4.64 {DoObjConfig - releasing old values} testobjconfig { -font {Times 8} -bitmap gray75 -border pink -cursor watch \ -custom barbaz concat {} -} {} -test config-4.65 {DoObjConfig - releasing old values} testobjconfig { +} -cleanup { + killTables +} -result {} +test config-4.110 {DoObjConfig - releasing old values} -constraints { + testobjconfig +} -setup { + catch {rename .foo {}} +} -body { # This test doesn't generate a useful value to check; if an # error occurs, it will be detected only by memory checking software # such as Purify or Tcl's built-in checker. - catch {rename .foo {}} testobjconfig internal .foo -string {Test string} -color yellow \ -font {Courier 18} -bitmap questhead -border green -cursor cross \ -custom foobar @@ -467,421 +1075,844 @@ test config-4.65 {DoObjConfig - releasing old values} testobjconfig { -font {Times 8} -bitmap gray75 -border pink -cursor watch \ -custom barbaz concat {} -} {} -test config-4.66 {DoObjConfig - custom} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -custom test} msg] $msg [catch {.foo cget -custom} result] $result [destroy .foo] -} {0 .foo 0 TEST {}} -test config-4.67 {DoObjConfig - null custom} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -custom {}} msg] $msg [catch {.foo cget -custom} result] $result [destroy .foo] -} {0 .foo 0 {} {}} -test config-4.68 {DoObjConfig - custom internal value} testobjconfig { +} -cleanup { + killTables +} -result {} + +test config-4.111 {DoObjConfig - custom} -constraints testobjconfig -body { + testobjconfig alltypes .foo -custom test +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.112 {DoObjConfig - custom} -constraints testobjconfig -body { + testobjconfig alltypes .foo -custom test + .foo cget -custom +} -cleanup { + killTables +} -returnCodes ok -result {TEST} +test config-4.113 {DoObjConfig - null custom} -constraints testobjconfig -body { + testobjconfig alltypes .foo -custom {} +} -cleanup { + killTables +} -returnCodes ok -result {.foo} +test config-4.114 {DoObjConfig - null custom} -constraints testobjconfig -body { + testobjconfig alltypes .foo -custom {} + .foo cget -custom +} -cleanup { + killTables +} -returnCodes ok -result {} +test config-4.115 {DoObjConfig - custom internal value} -constraints { + testobjconfig +} -setup { catch {rename .foo {}} +} -body { testobjconfig internal .foo -custom "this is a test" .foo cget -custom -} {THIS IS A TEST} +} -cleanup { + killTables +} -result {THIS IS A TEST} -test config-5.1 {ObjectIsEmpty - object is already string} testobjconfig { - catch {destroy .foo} + +test config-5.1 {ObjectIsEmpty - object is already string} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo -color [format ""] .foo cget -color -} {} -test config-5.2 {ObjectIsEmpty - object is already string} testobjconfig { - catch {destroy .foo} - list [catch {testobjconfig alltypes .foo -color [format " "]} msg] $msg -} {1 {unknown color name " "}} -test config-5.3 {ObjectIsEmpty - must convert back to string} testobjconfig { - catch {destroy .foo} +} -cleanup { + killTables +} -result {} +test config-5.2 {ObjectIsEmpty - object is already string} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .foo -color [format " "] +} -cleanup { + killTables +} -returnCodes error -result {unknown color name " "} +test config-5.3 {ObjectIsEmpty - must convert back to string} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo -color [list] .foo cget -color -} {} +} -cleanup { + killTables +} -result {} -deleteWindows -if {[testConstraint testobjconfig]} { + +test config-6.1 {GetOptionFromObj - cached answer} -constraints { + testobjconfig +} -body { testobjconfig chain2 .a - testobjconfig alltypes .b -} -test config-6.1 {GetOptionFromObj - cached answer} testobjconfig { list [.a cget -three] [.a cget -three] -} {three three} -test config-6.2 {GetOptionFromObj - exact match} testobjconfig { +} -cleanup { + killTables +} -result {three three} +test config-6.2 {GetOptionFromObj - exact match} -constraints { + testobjconfig +} -body { + testobjconfig chain2 .a .a cget -one -} {one} -test config-6.3 {GetOptionFromObj - abbreviation} testobjconfig { +} -cleanup { + killTables +} -result {one} +test config-6.3 {GetOptionFromObj - abbreviation} -constraints { + testobjconfig +} -body { + testobjconfig chain2 .a .a cget -fo -} {four} -test config-6.4 {GetOptionFromObj - ambiguous abbreviation} testobjconfig { - list [catch {.a cget -on} msg] $msg -} {1 {unknown option "-on"}} -test config-6.5 {GetOptionFromObj - duplicate options in different tables} testobjconfig { +} -cleanup { + killTables +} -result {four} +test config-6.4 {GetOptionFromObj - ambiguous abbreviation} -constraints { + testobjconfig +} -body { + testobjconfig chain2 .a + .a cget -on +} -cleanup { + killTables +} -cleanup { + killTables +} -returnCodes error -result {unknown option "-on"} +test config-6.5 {GetOptionFromObj - duplicate options in different tables} -constraints { + testobjconfig +} -body { + testobjconfig chain2 .a .a cget -tw -} {two and a half} -test config-6.6 {GetOptionFromObj - synonym} testobjconfig { +} -cleanup { + killTables +} -result {two and a half} +test config-6.6 {GetOptionFromObj - synonym} -constraints testobjconfig -body { + testobjconfig alltypes .b .b cget -synonym -} {red} +} -cleanup { + killTables +} -result {red} + -deleteWindows if {[testConstraint testobjconfig]} { testobjconfig alltypes .a } -test config-7.1 {Tk_SetOptions - basics} testobjconfig { +test config-7.1 {Tk_SetOptions - basics} -constraints testobjconfig -body { .a configure -color green -rel sunken list [.a cget -color] [.a cget -relief] -} {green sunken} -test config-7.2 {Tk_SetOptions - bogus option name} testobjconfig { - list [catch {.a configure -bogus} msg] $msg -} {1 {unknown option "-bogus"}} -test config-7.3 {Tk_SetOptions - synonym} testobjconfig { +} -result {green sunken} +test config-7.2 {Tk_SetOptions - bogus option name} -constraints { + testobjconfig +} -body { + .a configure -bogus +} -returnCodes error -result {unknown option "-bogus"} +test config-7.3 {Tk_SetOptions - synonym} -constraints testobjconfig -body { .a configure -synonym blue .a cget -color -} {blue} -test config-7.4 {Tk_SetOptions - missing value} testobjconfig { - list [catch {.a configure -color green -relief} msg] $msg [.a cget -color] -} {1 {value for "-relief" missing} green} -test config-7.5 {Tk_SetOptions - saving old values} testobjconfig { +} -result {blue} +test config-7.4 {Tk_SetOptions - missing value} -constraints { + testobjconfig +} -body { + .a configure -color green -relief +} -returnCodes error -result {value for "-relief" missing} +test config-7.5 {Tk_SetOptions - missing value} -constraints { + testobjconfig +} -body { + catch {.a configure -color green -relief} + .a cget -color +} -result {green} +test config-7.6 {Tk_SetOptions - saving old values} -constraints { + testobjconfig +} -body { + .a configure -color red -int 7 -relief raised -double 3.14159 + .a csave -color green -int 432 -relief sunken -double 2.0 -color bogus +} -returnCodes error -result {unknown color name "bogus"} +test config-7.7 {Tk_SetOptions - saving old values} -constraints { + testobjconfig +} -body { .a configure -color red -int 7 -relief raised -double 3.14159 - list [catch {.a csave -color green -int 432 -relief sunken \ - -double 2.0 -color bogus} msg] $msg [.a cget -color] \ - [.a cget -int] [.a cget -relief] [.a cget -double] -} {1 {unknown color name "bogus"} red 7 raised 3.14159} -test config-7.6 {Tk_SetOptions - error in DoObjConfig call} testobjconfig { - list [catch {.a configure -color bogus} msg] $msg $errorInfo -} {1 {unknown color name "bogus"} {unknown color name "bogus" + catch {.a csave -color green -int 432 -relief sunken -double 2.0 -color bogus} + list [.a cget -color] [.a cget -int] [.a cget -relief] [.a cget -double] +} -result {red 7 raised 3.14159} + +test config-7.8 {Tk_SetOptions - error in DoObjConfig call} -constraints { + testobjconfig +} -body { + .a configure -color bogus +} -returnCodes error -result {unknown color name "bogus"} +test config-7.9 {Tk_SetOptions - error in DoObjConfig call} -constraints { + testobjconfig +} -body { + catch {.a configure -color bogus} + return $errorInfo +} -result {unknown color name "bogus" (processing "-color" option) invoked from within -".a configure -color bogus"}} -test config-7.7 {Tk_SetOptions - synonym name in error message} testobjconfig { - list [catch {.a configure -synonym bogus} msg] $msg $errorInfo -} {1 {unknown color name "bogus"} {unknown color name "bogus" +".a configure -color bogus"} + +test config-7.10 {Tk_SetOptions - synonym name in error message} -constraints { + testobjconfig +} -body { + .a configure -synonym bogus +} -returnCodes error -result {unknown color name "bogus"} +test config-7.11 {Tk_SetOptions - synonym name in error message} -constraints { + testobjconfig +} -body { + catch {.a configure -synonym bogus} + return $errorInfo +} -result {unknown color name "bogus" (processing "-synonym" option) invoked from within -".a configure -synonym bogus"}} -test config-7.8 {Tk_SetOptions - returning mask} testobjconfig { +".a configure -synonym bogus"} +test config-7.12 {Tk_SetOptions - returning mask} -constraints testobjconfig -body { format %x [.a configure -color red -int 7 -relief raised -double 3.14159] -} {226} -test config-7.9 {Tk_SetOptions - error in DoObjConfig with custom option} testobjconfig { - list [catch {.a configure -custom bad} msg] $msg $errorInfo -} {1 {expected good value, got "BAD"} {expected good value, got "BAD" +} -result {226} +test config-7.13 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints { + testobjconfig +} -body { + .a configure -custom bad +} -returnCodes error -result {expected good value, got "BAD"} +test config-7.14 {Tk_SetOptions - error in DoObjConfig with custom option} -constraints { + testobjconfig +} -body { + catch {.a configure -custom bad} + return $errorInfo +} -result {expected good value, got "BAD" (processing "-custom" option) invoked from within -".a configure -custom bad"}} +".a configure -custom bad"} +if {[testConstraint testobjconfig]} { + killTables +} -test config-8.1 {Tk_RestoreSavedOptions - restore in proper order} testobjconfig { - deleteWindows + +test config-8.1 {Tk_RestoreSavedOptions - restore in proper order} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a - list [catch {.a csave -color green -color black -color blue \ - -color #ffff00 -color #ff00ff -color bogus} msg] $msg \ - [.a cget -color] -} {1 {unknown color name "bogus"} red} -test config-8.2 {Tk_RestoreSavedOptions - freeing object memory} testobjconfig { - deleteWindows + .a csave -color green -color black -color blue \ + -color #ffff00 -color #ff00ff -color bogus \ +} -cleanup { + killTables +} -returnCodes error -result {unknown color name "bogus"} +test config-8.2 {Tk_RestoreSavedOptions - restore in proper order} -constraints { + testobjconfig +} -body { testobjconfig alltypes .a - .a csave -color green -color black -color blue -color #ffff00 \ - -color #ff00ff -} {32} -test config-8.3 {Tk_RestoreSavedOptions - boolean internal form} testobjconfig { - deleteWindows + catch {.a csave -color green -color black -color blue \ + -color #ffff00 -color #ff00ff -color bogus} + .a cget -color +} -cleanup { + killTables +} -result {red} +test config-8.3 {Tk_RestoreSavedOptions - freeing object memory} -constraints { + testobjconfig +} -body { + testobjconfig alltypes .a + .a csave -color green -color black -color blue -color #ffff00 -color #ff00ff +} -cleanup { + killTables +} -result {32} +test config-8.4 {Tk_RestoreSavedOptions - boolean internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -boolean 0 -color bogus}] [.a cget -boolean] -} {1 1} -test config-8.4 {Tk_RestoreSavedOptions - integer internal form} testobjconfig { - deleteWindows + .a csave -boolean 0 -color bogus +} -cleanup { + killTables +} -returnCodes error -match glob -result * +test config-8.5 {Tk_RestoreSavedOptions - boolean internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -integer 24 -color bogus}] [.a cget -integer] -} {1 148962237} -test config-8.5 {Tk_RestoreSavedOptions - double internal form} testobjconfig { - deleteWindows + catch {.a csave -boolean 0 -color bogus} + .a cget -boolean +} -cleanup { + killTables +} -result {1} +test config-8.6 {Tk_RestoreSavedOptions - integer internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -double 62.4 -color bogus}] [.a cget -double] -} {1 3.14159} -test config-8.6 {Tk_RestoreSavedOptions - string internal form} testobjconfig { - deleteWindows + .a csave -integer 24 -color bogus +} -cleanup { + killTables +} -returnCodes error -match glob -result * +test config-8.7 {Tk_RestoreSavedOptions - integer internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -string "A long string" -color bogus}] \ - [.a cget -string] -} {1 foo} -test config-8.7 {Tk_RestoreSavedOptions - string table internal form} testobjconfig { - deleteWindows + catch {.a csave -integer 24 -color bogus} + .a cget -integer +} -cleanup { + killTables +} -result {148962237} +test config-8.8 {Tk_RestoreSavedOptions - double internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -stringtable three -color bogus}] \ - [.a cget -stringtable] -} {1 one} -test config-8.8 {Tk_RestoreSavedOptions - color internal form} testobjconfig { - deleteWindows + catch {.a csave -double 62.4 -color bogus} + .a cget -double +} -cleanup { + killTables +} -result {3.14159} +test config-8.9 {Tk_RestoreSavedOptions - string internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -color green -color bogus}] [.a cget -color] -} {1 red} -test config-8.9 {Tk_RestoreSavedOptions - font internal form} {testobjconfig nonPortable} { - deleteWindows + catch {.a csave -string "A long string" -color bogus} + .a cget -string +} -cleanup { + killTables +} -result {foo} +test config-8.10 {Tk_RestoreSavedOptions - string table internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -font {Times 12} -color bogus}] [.a cget -font] -} {1 {Helvetica 12}} -test config-8.10 {Tk_RestoreSavedOptions - bitmap internal form} testobjconfig { - deleteWindows + catch {.a csave -stringtable three -color bogus} + .a cget -stringtable +} -cleanup { + killTables +} -result {one} +test config-8.11 {Tk_RestoreSavedOptions - color internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -bitmap questhead -color bogus}] [.a cget -bitmap] -} {1 gray50} -test config-8.11 {Tk_RestoreSavedOptions - border internal form} testobjconfig { - deleteWindows + catch {.a csave -color green -color bogus} + .a cget -color +} -cleanup { + killTables +} -result {red} +test config-8.12 {Tk_RestoreSavedOptions - font internal form} -constraints { + testobjconfig nonPortable +} -body { testobjconfig internal .a - list [catch {.a csave -border brown -color bogus}] [.a cget -border] -} {1 blue} -test config-8.12 {Tk_RestoreSavedOptions - relief internal form} testobjconfig { - deleteWindows + catch {.a csave -font {Times 12} -color bogus} + .a cget -font +} -cleanup { + killTables +} -result {Helvetica 12} +test config-8.13 {Tk_RestoreSavedOptions - bitmap internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -relief sunken -color bogus}] [.a cget -relief] -} {1 raised} -test config-8.13 {Tk_RestoreSavedOptions - cursor internal form} testobjconfig { - deleteWindows + catch {.a csave -bitmap questhead -color bogus} + .a cget -bitmap +} -cleanup { + killTables +} -result {gray50} +test config-8.14 {Tk_RestoreSavedOptions - border internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -cursor watch -color bogus}] [.a cget -cursor] -} {1 xterm} -test config-8.14 {Tk_RestoreSavedOptions - justify internal form} testobjconfig { - deleteWindows + catch {.a csave -border brown -color bogus} + .a cget -border +} -cleanup { + killTables +} -result {blue} +test config-8.15 {Tk_RestoreSavedOptions - relief internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -justify right -color bogus}] [.a cget -justify] -} {1 left} -test config-8.15 {Tk_RestoreSavedOptions - anchor internal form} testobjconfig { - deleteWindows + catch {.a csave -relief sunken -color bogus} + .a cget -relief +} -cleanup { + killTables +} -result {raised} +test config-8.16 {Tk_RestoreSavedOptions - cursor internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a - list [catch {.a csave -anchor center -color bogus}] [.a cget -anchor] -} {1 n} -test config-8.16 {Tk_RestoreSavedOptions - window internal form} testobjconfig { - deleteWindows + catch {.a csave -cursor watch -color bogus} + .a cget -cursor +} -cleanup { + killTables +} -result {xterm} +test config-8.17 {Tk_RestoreSavedOptions - justify internal form} -constraints { + testobjconfig +} -body { + testobjconfig internal .a + catch {.a csave -justify right -color bogus} + .a cget -justify +} -cleanup { + killTables +} -result {left} +test config-8.18 {Tk_RestoreSavedOptions - anchor internal form} -constraints { + testobjconfig +} -body { + testobjconfig internal .a + catch {.a csave -anchor center -color bogus} + .a cget -anchor +} -cleanup { + killTables +} -result {n} +test config-8.19 {Tk_RestoreSavedOptions - window internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a -window .a - list [catch {.a csave -window .a -color bogus}] [.a cget -window] -} {1 .a} -test config-8.17 {Tk_RestoreSavedOptions - custom internal form} testobjconfig { - deleteWindows + catch {.a csave -window .a -color bogus} + .a cget -window +} -cleanup { + killTables +} -result {.a} +test config-8.20 {Tk_RestoreSavedOptions - custom internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .a -custom "foobar" - list [catch {.a csave -custom "barbaz" -color bogus}] [.a cget -custom] -} {1 FOOBAR} + catch {.a csave -custom "barbaz" -color bogus} + .a cget -custom +} -cleanup { + killTables +} -result {FOOBAR} # Most of the tests below will cause memory leakage if there is a # problem. This may not be evident unless the tests are run in # conjunction with a memory usage analyzer such as Purify. -test config-9.1 {Tk_FreeConfigOptions/FreeResources - string internal form} testobjconfig { - catch {destroy .foo} +test config-9.1 {Tk_FreeConfigOptions/FreeResources - string internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -string "two words" destroy .foo -} {} -test config-9.2 {Tk_FreeConfigOptions/FreeResources - color internal form} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.2 {Tk_FreeConfigOptions/FreeResources - color internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -color yellow destroy .foo -} {} -test config-9.3 {Tk_FreeConfigOptions/FreeResources - color} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.3 {Tk_FreeConfigOptions/FreeResources - color} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -color [format blue] destroy .foo -} {} -test config-9.4 {Tk_FreeConfigOptions/FreeResources - font internal form} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.4 {Tk_FreeConfigOptions/FreeResources - font internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -font {Courier 20} destroy .foo -} {} -test config-9.5 {Tk_FreeConfigOptions/FreeResources - font} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.5 {Tk_FreeConfigOptions/FreeResources - font} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -font [format {Courier 24}] destroy .foo -} {} -test config-9.6 {Tk_FreeConfigOptions/FreeResources - bitmap internal form} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.6 {Tk_FreeConfigOptions/FreeResources - bitmap internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -bitmap gray75 destroy .foo -} {} -test config-9.7 {Tk_FreeConfigOptions/FreeResources - bitmap} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.7 {Tk_FreeConfigOptions/FreeResources - bitmap} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -bitmap [format gray75] destroy .foo -} {} -test config-9.8 {Tk_FreeConfigOptions/FreeResources - border internal form} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.8 {Tk_FreeConfigOptions/FreeResources - border internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -border orange destroy .foo -} {} -test config-9.9 {Tk_FreeConfigOptions/FreeResources - border} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.9 {Tk_FreeConfigOptions/FreeResources - border} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -border [format blue] destroy .foo -} {} -test config-9.10 {Tk_FreeConfigOptions/FreeResources - cursor internal form} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.10 {Tk_FreeConfigOptions/FreeResources - cursor internal form} -constraints { + testobjconfig +} -body { testobjconfig internal .foo .foo configure -cursor cross destroy .foo -} {} -test config-9.11 {Tk_FreeConfigOptions/FreeResources - cursor} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.11 {Tk_FreeConfigOptions/FreeResources - cursor} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -cursor [format watch] destroy .foo -} {} -test config-9.12 {Tk_FreeConfigOptions/FreeResources - not special} testobjconfig { - catch {destroy .foo} +} -result {} +test config-9.12 {Tk_FreeConfigOptions/FreeResources - not special} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -integer [format 27] destroy .foo -} {} -test config-9.13 {Tk_FreeConfigOptions/FreeResources - custom internal form} testobjconfig { +} -result {} +test config-9.13 {Tk_FreeConfigOptions/FreeResources - custom internal form} -constraints { + testobjconfig +} -body { catch {destroy .fpp} testobjconfig internal .foo .foo configure -custom "foobar" destroy .foo -} {} +} -result {} +if {[testConstraint testobjconfig]} { + killTables +} + -test config-10.1 {Tk_GetOptionInfo - one item} testobjconfig { - catch {destroy .foo} +test config-10.1 {Tk_GetOptionInfo - one item} -constraints testobjconfig -body { testobjconfig alltypes .foo .foo configure -relief groove .foo configure -relief -} {-relief relief Relief raised groove} -test config-10.2 {Tk_GetOptionInfo - one item, synonym} testobjconfig { - catch {destroy .foo} +} -cleanup { + destroy .foo +} -result {-relief relief Relief raised groove} +test config-10.2 {Tk_GetOptionInfo - one item, synonym} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo .foo configure -color black .foo configure -synonym -} {-color color Color red black} -test config-10.3 {Tk_GetOptionInfo - all items} testobjconfig { - catch {destroy .foo} +} -cleanup { + destroy .foo +} -result {-color color Color red black} +test config-10.3 {Tk_GetOptionInfo - all items} -constraints { + testobjconfig +} -body { testobjconfig alltypes .foo -font {Helvetica 18} -integer 13563 .foo configure -} {{-boolean boolean Boolean 1 1} {-integer integer Integer 7 13563} {-double double Double 3.14159 3.14159} {-string string String foo foo} {-stringtable StringTable stringTable one one} {-color color Color red red} {-font font Font {Helvetica 12} {Helvetica 18}} {-bitmap bitmap Bitmap gray50 gray50} {-border border Border blue blue} {-relief relief Relief raised raised} {-cursor cursor Cursor xterm xterm} {-justify {} {} left left} {-anchor anchor Anchor {} {}} {-pixel pixel Pixel 1 1} {-custom {} {} {} {}} {-synonym -color}} -test config-10.4 {Tk_GetOptionInfo - chaining through tables} testobjconfig { - catch {destroy .foo} +} -cleanup { + destroy .foo +} -result {{-boolean boolean Boolean 1 1} {-integer integer Integer 7 13563} {-double double Double 3.14159 3.14159} {-string string String foo foo} {-stringtable StringTable stringTable one one} {-color color Color red red} {-font font Font {Helvetica 12} {Helvetica 18}} {-bitmap bitmap Bitmap gray50 gray50} {-border border Border blue blue} {-relief relief Relief raised raised} {-cursor cursor Cursor xterm xterm} {-justify {} {} left left} {-anchor anchor Anchor {} {}} {-pixel pixel Pixel 1 1} {-custom {} {} {} {}} {-synonym -color}} +test config-10.4 {Tk_GetOptionInfo - chaining through tables} -constraints testobjconfig -body { testobjconfig chain2 .foo -one asdf -three xyzzy .foo configure -} {{-three three Three three xyzzy} {-four four Four four four} {-two two Two {two and a half} {two and a half}} {-oneAgain oneAgain OneAgain {one again} {one again}} {-one one One one asdf} {-two two Two two {two and a half}}} +} -cleanup { + destroy .foo +} -result {{-three three Three three xyzzy} {-four four Four four four} {-two two Two {two and a half} {two and a half}} {-oneAgain oneAgain OneAgain {one again} {one again}} {-one one One one asdf} {-two two Two two {two and a half}}} +if {[testConstraint testobjconfig]} { + killTables +} + -deleteWindows if {[testConstraint testobjconfig]} { testobjconfig alltypes .a } -test config-11.1 {GetConfigList - synonym} testobjconfig { +test config-11.1 {GetConfigList - synonym} -constraints testobjconfig -body { lindex [.a configure] end -} {-synonym -color} -test config-11.2 {GetConfigList - null database names} testobjconfig { +} -result {-synonym -color} +test config-11.2 {GetConfigList - null database names} -constraints { + testobjconfig +} -body { .a configure -justify -} {-justify {} {} left left} -test config-11.3 {GetConfigList - null default and current value} testobjconfig { +} -result {-justify {} {} left left} +test config-11.3 {GetConfigList - null default and current value} -constraints { + testobjconfig +} -body { .a configure -anchor -} {-anchor anchor Anchor {} {}} +} -result {-anchor anchor Anchor {} {}} +if {[testConstraint testobjconfig]} { + killTables +} + -deleteWindows if {[testConstraint testobjconfig]} { testobjconfig internal .a } -test config-12.1 {GetObjectForOption - boolean} testobjconfig { +test config-12.1 {GetObjectForOption - boolean} -constraints testobjconfig -body { .a configure -boolean 0 .a cget -boolean -} {0} -test config-12.2 {GetObjectForOption - integer} testobjconfig { +} -result {0} +test config-12.2 {GetObjectForOption - integer} -constraints testobjconfig -body { .a configure -integer 1247 .a cget -integer -} {1247} -test config-12.3 {GetObjectForOption - double} testobjconfig { +} -result {1247} +test config-12.3 {GetObjectForOption - double} -constraints testobjconfig -body { .a configure -double -88.82 .a cget -double -} {-88.82} -test config-12.4 {GetObjectForOption - string} testobjconfig { +} -result {-88.82} +test config-12.4 {GetObjectForOption - string} -constraints testobjconfig -body { .a configure -string "test value" .a cget -string -} {test value} -test config-12.5 {GetObjectForOption - stringTable} testobjconfig { +} -result {test value} +test config-12.5 {GetObjectForOption - stringTable} -constraints { + testobjconfig +} -body { .a configure -stringtable "two" .a cget -stringtable -} {two} -test config-12.6 {GetObjectForOption - color} testobjconfig { +} -result {two} +test config-12.6 {GetObjectForOption - color} -constraints testobjconfig -body { .a configure -color "green" .a cget -color -} {green} -test config-12.7 {GetObjectForOption - font} testobjconfig { +} -result {green} +test config-12.7 {GetObjectForOption - font} -constraints testobjconfig -body { .a configure -font {Times 36} .a cget -font -} {Times 36} -test config-12.8 {GetObjectForOption - bitmap} testobjconfig { +} -result {Times 36} +test config-12.8 {GetObjectForOption - bitmap} -constraints testobjconfig -body { .a configure -bitmap "questhead" .a cget -bitmap -} {questhead} -test config-12.9 {GetObjectForOption - border} testobjconfig { +} -result {questhead} +test config-12.9 {GetObjectForOption - border} -constraints testobjconfig -body { .a configure -border #33217c .a cget -border -} {#33217c} -test config-12.10 {GetObjectForOption - relief} testobjconfig { +} -result {#33217c} +test config-12.10 {GetObjectForOption - relief} -constraints { + testobjconfig +} -body { .a configure -relief groove .a cget -relief -} {groove} -test config-12.11 {GetObjectForOption - cursor} testobjconfig { +} -result {groove} +test config-12.11 {GetObjectForOption - cursor} -constraints { + testobjconfig +} -body { .a configure -cursor watch .a cget -cursor -} {watch} -test config-12.12 {GetObjectForOption - justify} testobjconfig { +} -result {watch} +test config-12.12 {GetObjectForOption - justify} -constraints { + testobjconfig +} -body { .a configure -justify right .a cget -justify -} {right} -test config-12.13 {GetObjectForOption - anchor} testobjconfig { +} -result {right} +test config-12.13 {GetObjectForOption - anchor} -constraints testobjconfig -body { .a configure -anchor e .a cget -anchor -} {e} -test config-12.14 {GetObjectForOption - pixels} testobjconfig { +} -result {e} +test config-12.14 {GetObjectForOption - pixels} -constraints testobjconfig -body { .a configure -pixel 193.2 .a cget -pixel -} {193} -test config-12.15 {GetObjectForOption - window} testobjconfig { +} -result {193} +test config-12.15 {GetObjectForOption - window} -constraints testobjconfig -body { .a configure -window .a .a cget -window -} {.a} -test config-12.16 {GetObjectForOption -custom} testobjconfig { +} -result {.a} +test config-12.16 {GetObjectForOption -custom} -constraints testobjconfig -body { .a configure -custom foobar .a cget -custom -} {FOOBAR} -test config-12.17 {GetObjectForOption - null values} testobjconfig { +} -result {FOOBAR} +test config-12.17 {GetObjectForOption - null values} -constraints { + testobjconfig +} -body { .a configure -string {} -color {} -font {} -bitmap {} -border {} \ -cursor {} -window {} -custom {} list [.a cget -string] [.a cget -color] [.a cget -font] \ [.a cget -bitmap] [.a cget -border] [.a cget -cursor] \ [.a cget -window] [.a cget -custom] -} {{} {} {} {} {} {} {} {}} - -test config-13.1 {proper cleanup of options with widget destroy} { - foreach type { - button canvas entry frame listbox menu menubutton message - scale scrollbar text radiobutton checkbutton - } { - destroy .w - $type .w -cursor crosshair - destroy .w - } -} {} +} -result {{} {} {} {} {} {} {} {}} +if {[testConstraint testobjconfig]} { + killTables +} -deleteWindows -test config-14.1 {Tk_CreateOptionTable - use with namespace import} { +test config-13.1 {proper cleanup of options with widget destroy} -body { + button .w -cursor crosshair + destroy .w +} -result {} +test config-13.2 {proper cleanup of options with widget destroy} -body { + canvas .w -cursor crosshair + destroy .w +} -result {} +test config-13.3 {proper cleanup of options with widget destroy} -body { + entry .w -cursor crosshair + destroy .w +} -result {} +test config-13.4 {proper cleanup of options with widget destroy} -body { + frame .w -cursor crosshair + destroy .w +} -result {} +test config-13.5 {proper cleanup of options with widget destroy} -body { + listbox .w -cursor crosshair + destroy .w +} -result {} +test config-13.6 {proper cleanup of options with widget destroy} -body { + menu .w -cursor crosshair + destroy .w +} -result {} +test config-13.7 {proper cleanup of options with widget destroy} -body { + menubutton .w -cursor crosshair + destroy .w +} -result {} +test config-13.8 {proper cleanup of options with widget destroy} -body { + message .w -cursor crosshair + destroy .w +} -result {} +test config-13.9 {proper cleanup of options with widget destroy} -body { + scale .w -cursor crosshair + destroy .w +} -result {} +test config-13.10 {proper cleanup of options with widget destroy} -body { + scrollbar .w -cursor crosshair + destroy .w +} -result {} +test config-13.11 {proper cleanup of options with widget destroy} -body { + text .w -cursor crosshair + destroy .w +} -result {} +test config-13.12 {proper cleanup of options with widget destroy} -body { + radiobutton .w -cursor crosshair + destroy .w +} -result {} +test config-13.13 {proper cleanup of options with widget destroy} -body { + checkbutton .w -cursor crosshair + destroy .w +} -result {} + +test config-14.1 {Tk_CreateOptionTable - use with namespace import} -setup { namespace export -clear * - foreach type { - button canvas entry frame listbox menu menubutton message - scale scrollbar spinbox text radiobutton checkbutton - } { - namespace eval ::foo [subst { - namespace import -force ::$type - ::foo::$type .a - ::foo::$type .b - } - ] - destroy .a .b - } -} {} +} -body { + namespace eval ::foo [subst { + namespace import -force ::button + ::foo::button .a + ::foo::button .b + } + ] + destroy .a .b +} -result {} +test config-14.2 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::canvas + ::foo::canvas .a + ::foo::canvas .b + } + ] + destroy .a .b +} -result {} +test config-14.3 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::entry + ::foo::entry .a + ::foo::entry .b + } + ] + destroy .a .b +} -result {} +test config-14.4 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::frame + ::foo::frame .a + ::foo::frame .b + } + ] + destroy .a .b +} -result {} +test config-14.5 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::listbox + ::foo::listbox .a + ::foo::listbox .b + } + ] + destroy .a .b +} -result {} +test config-14.6 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::menu + ::foo::menu .a + ::foo::menu .b + } + ] + destroy .a .b +} -result {} +test config-14.7 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::menubutton + ::foo::menubutton .a + ::foo::menubutton .b + } + ] + destroy .a .b +} -result {} +test config-14.8 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::message + ::foo::message .a + ::foo::message .b + } + ] + destroy .a .b +} -result {} +test config-14.9 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::scale + ::foo::scale .a + ::foo::scale .b + } + ] + destroy .a .b +} -result {} +test config-14.10 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::scrollbar + ::foo::scrollbar .a + ::foo::scrollbar .b + } + ] + destroy .a .b +} -result {} +test config-14.11 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::spinbox + ::foo::spinbox .a + ::foo::spinbox .b + } + ] + destroy .a .b +} -result {} +test config-14.12 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::text + ::foo::text .a + ::foo::text .b + } + ] + destroy .a .b +} -result {} +test config-14.13 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::radiobutton + ::foo::radiobutton .a + ::foo::radiobutton .b + } + ] + destroy .a .b +} -result {} +test config-14.14 {Tk_CreateOptionTable - use with namespace import} -setup { + namespace export -clear * +} -body { + namespace eval ::foo [subst { + namespace import -force ::checkbutton + ::foo::checkbutton .a + ::foo::checkbutton .b + } + ] + destroy .a .b +} -result {} + # cleanup deleteWindows @@ -890,3 +1921,11 @@ if {[testConstraint testobjconfig]} { } cleanupTests return + + + + + + + + -- cgit v0.12