summaryrefslogtreecommitdiffstats
path: root/tests/embed.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/embed.test')
-rw-r--r--tests/embed.test26
1 files changed, 25 insertions, 1 deletions
diff --git a/tests/embed.test b/tests/embed.test
index 88a6a95..6cf4854 100644
--- a/tests/embed.test
+++ b/tests/embed.test
@@ -4,12 +4,14 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: embed.test,v 1.3 2003/04/01 21:06:22 dgp Exp $
+# RCS: @(#) $Id: embed.test,v 1.4 2005/02/15 03:22:10 chengyemao Exp $
package require tcltest 2.1
eval tcltest::configure $argv
tcltest::loadTestedCommands
+global tcl_platform
+
test embed-1.1 {TkpUseWindow procedure, bad window identifier} {
deleteWindows
list [catch {toplevel .t -use xyz} msg] $msg
@@ -28,6 +30,26 @@ test embed-1.3 {CreateFrame procedure, both -use and
-container 1} msg] $msg
} {1 {A window cannot have both the -use and the -container option set.}}
+if {$tcl_platform(platform) == "windows"} {
+
+# testing window embedding for Windows platform
+
+test embed-1.4 {TkpUseWindow procedure, -container must be set} {
+ deleteWindows
+ toplevel .container
+ list [catch {toplevel .embd -use [winfo id .container]} err] $err
+} {1 {the window to use is not a Tk container}}
+
+test embed-1.5 {TkpUseWindow procedure, -container must be set} {
+ deleteWindows
+ frame .container
+ list [catch {toplevel .embd -use [winfo id .container]} err] $err
+} {1 {the window to use is not a Tk container}}
+
+} else {
+
+# testing window embedding for other platforms
+
test embed-1.4 {TkpUseWindow procedure, -container must be set} {
deleteWindows
toplevel .container
@@ -40,9 +62,11 @@ test embed-1.5 {TkpUseWindow procedure, -container must be set} {
list [catch {toplevel .embd -use [winfo id .container]} err] $err
} {1 {window ".container" doesn't have -container option set}}
+}
# FIXME: test cases common to unixEmbed.test and macEmbed.test should
# be moved here.
cleanupTests
return
+