summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2002-07-15 16:56:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2002-07-15 16:56:31 (GMT)
commit043de52c9870236b12bc1231eccf35e61b22558c (patch)
tree230ae2938c63f2aa5abf5179608344bbe3d77f2a
parent2e111650d22e90af7843a8c343a87d136ea8a409 (diff)
downloadtk-043de52c9870236b12bc1231eccf35e61b22558c.zip
tk-043de52c9870236b12bc1231eccf35e61b22558c.tar.gz
tk-043de52c9870236b12bc1231eccf35e61b22558c.tar.bz2
* Fixes for [Bug 581627].
* generic/tkTest.c: Test commands not supported on non-Unix platforms should not be defined there in the first place. * tests/constraints.tcl: Fixed "secureserver" constraint. * tests/unixWm.test: Some tests needed "unix" constraint. * win/tkWinWm.c: Typo in error message.
-rw-r--r--ChangeLog10
-rw-r--r--generic/tkTest.c12
-rw-r--r--tests/constraints.tcl11
-rw-r--r--tests/unixWm.test10
-rw-r--r--win/tkWinWm.c4
5 files changed, 30 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a74420..e15eeeb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
-2002-07-14 Don Porter <dgp@users.sf.net>
+2002-07-15 Don Porter <dgp@users.sf.net>
+
+ * Fixes for [Bug 581627].
+ * generic/tkTest.c: Test commands not supported on non-Unix
+ platforms should not be defined there in the first place.
+ * tests/constraints.tcl: Fixed "secureserver" constraint.
+ * tests/unixWm.test: Some tests needed "unix" constraint.
+ * win/tkWinWm.c: Typo in error message.
+2002-07-14 Don Porter <dgp@users.sf.net>
* tests/event.test: Fixes to enable testing of only userInteraction
* tests/visual_bb.test: tests.
diff --git a/generic/tkTest.c b/generic/tkTest.c
index d506dce..d58aac1 100644
--- a/generic/tkTest.c
+++ b/generic/tkTest.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkTest.c,v 1.17 2002/07/09 17:53:54 dgp Exp $
+ * RCS: @(#) $Id: tkTest.c,v 1.18 2002/07/15 16:56:32 dgp Exp $
*/
#include "tkInt.h"
@@ -281,16 +281,20 @@ Tktest_Init(interp)
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
Tcl_CreateCommand(interp, "testmakeexist", TestmakeexistCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
+#if !(defined(__WIN32__) || defined(MAC_TCL))
Tcl_CreateCommand(interp, "testmenubar", TestmenubarCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
+#endif
#if defined(__WIN32__) || defined(MAC_TCL)
Tcl_CreateCommand(interp, "testmetrics", TestmetricsCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
#endif
Tcl_CreateCommand(interp, "testprop", TestpropCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
+#if !(defined(__WIN32__) || defined(MAC_TCL))
Tcl_CreateCommand(interp, "testsend", TestsendCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
+#endif
Tcl_CreateCommand(interp, "testtext", TesttextCmd,
(ClientData) Tk_MainWindow(interp), (Tcl_CmdDeleteProc *) NULL);
#if !(defined(__WIN32__) || defined(MAC_TCL))
@@ -2186,6 +2190,7 @@ TestpropCmd(clientData, interp, argc, argv)
*/
/* ARGSUSED */
+#if !(defined(__WIN32__) || defined(MAC_TCL))
static int
TestsendCmd(clientData, interp, argc, argv)
ClientData clientData; /* Main window for application. */
@@ -2193,9 +2198,7 @@ TestsendCmd(clientData, interp, argc, argv)
int argc; /* Number of arguments. */
char **argv; /* Argument strings. */
{
-#if !(defined(__WIN32__) || defined(MAC_TCL))
TkWindow *winPtr = (TkWindow *) clientData;
-#endif
if (argc < 2) {
Tcl_AppendResult(interp, "wrong # args; must be \"", argv[0],
@@ -2203,7 +2206,6 @@ TestsendCmd(clientData, interp, argc, argv)
return TCL_ERROR;
}
-#if !(defined(__WIN32__) || defined(MAC_TCL))
if (strcmp(argv[1], "bogus") == 0) {
XChangeProperty(winPtr->dispPtr->display,
RootWindow(winPtr->dispPtr->display, 0),
@@ -2272,9 +2274,9 @@ TestsendCmd(clientData, interp, argc, argv)
"\": must be bogus, prop, or serial", (char *) NULL);
return TCL_ERROR;
}
-#endif
return TCL_OK;
}
+#endif
/*
*----------------------------------------------------------------------
diff --git a/tests/constraints.tcl b/tests/constraints.tcl
index 3c28b3a..01ed60d 100644
--- a/tests/constraints.tcl
+++ b/tests/constraints.tcl
@@ -161,10 +161,13 @@ testConstraint pseudocolor8 [expr {([catch {
destroy .t
setupbg
set app [dobg {tk appname}]
-testConstraint secureserver 1
-if {[catch {send $app set a 0} msg] == 1} {
- if {[string match "X server insecure *" $msg]} {
- testConstraint secureserver 0
+testConstraint secureserver 0
+if {[llength [info commands send]]} {
+ testConstraint secureserver 1
+ if {[catch {send $app set a 0} msg] == 1} {
+ if {[string match "X server insecure *" $msg]} {
+ testConstraint secureserver 0
+ }
}
}
cleanupbg
diff --git a/tests/unixWm.test b/tests/unixWm.test
index 8c55ac5..e430c84 100644
--- a/tests/unixWm.test
+++ b/tests/unixWm.test
@@ -7,7 +7,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: unixWm.test,v 1.23 2002/07/13 21:52:34 dgp Exp $
+# RCS: @(#) $Id: unixWm.test,v 1.24 2002/07/15 16:56:32 dgp Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -789,7 +789,7 @@ test unixWm-21.5 {Tk_WmCmd procedure, "group" option, create leader wrapper} {un
set result
} {{} 0}
-test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} {
+test unixWm-22.1 {Tk_WmCmd procedure, "iconbitmap" option} unix {
list [catch {wm iconbitmap .t 12 13} msg] $msg
} {1 {wrong # arguments: must be "wm iconbitmap window ?bitmap?"}}
test unixWm-22.2 {Tk_WmCmd procedure, "iconbitmap" option} {unix testwrapper} {
@@ -1163,7 +1163,7 @@ test unixWm-34.3 {Tk_WmCmd procedure, "sizefrom" option} {
list [catch {wm sizefrom .t none} msg] $msg
} {1 {bad argument "none": must be program or user}}
-test unixWm-35.1 {Tk_WmCmd procedure, "state" option} {
+test unixWm-35.1 {Tk_WmCmd procedure, "state" option} unix {
list [catch {wm state .t 1} msg] $msg
} {1 {bad argument "1": must be normal, iconic or withdrawn}}
test unixWm-35.2 {Tk_WmCmd procedure, "state" option} {
@@ -2387,12 +2387,12 @@ test unixWm-59.3 {exit processing} {
list $error $msg
} {0 {}}
-test unixWm-60.1 {wm attributes} {
+test unixWm-60.1 {wm attributes} unix {
destroy .t
toplevel .t
wm attributes .t
} {}
-test unixWm-60.2 {wm attributes} {
+test unixWm-60.2 {wm attributes} unix {
destroy .t
toplevel .t
list [catch {wm attributes .t -foo} msg] $msg
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index b9ae2bd..952642b 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkWinWm.c,v 1.46 2002/06/24 20:34:40 mdejong Exp $
+ * RCS: @(#) $Id: tkWinWm.c,v 1.47 2002/07/15 16:56:32 dgp Exp $
*/
#include "tkWinInt.h"
@@ -3496,7 +3496,7 @@ Tk_WmCmd(clientData, interp, argc, argv)
"focusmodel, frame, geometry, grid, group, iconbitmap, ",
"iconify, iconmask, iconname, iconposition, ",
"iconwindow, maxsize, minsize, overrideredirect, ",
- "positionfrom, protocol, resizable, sizefrom, stackorder ",
+ "positionfrom, protocol, resizable, sizefrom, stackorder, ",
"state, title, transient, or withdraw",
(char *) NULL);
return TCL_ERROR;