diff options
author | chengyemao <chengyemao> | 2005-02-15 03:22:10 (GMT) |
---|---|---|
committer | chengyemao <chengyemao> | 2005-02-15 03:22:10 (GMT) |
commit | aee29491b0abebba92b1106ddf35a5724ac0a9e9 (patch) | |
tree | f7879d1d03edccdd9961327c7fbb495a9b5d0730 /tests/embed.test | |
parent | 6e1a009795f451583308dda6b41c6249b637933c (diff) | |
download | tk-aee29491b0abebba92b1106ddf35a5724ac0a9e9.zip tk-aee29491b0abebba92b1106ddf35a5724ac0a9e9.tar.gz tk-aee29491b0abebba92b1106ddf35a5724ac0a9e9.tar.bz2 |
Modified for the latest embedded/container window implementation for Windows platform
Diffstat (limited to 'tests/embed.test')
-rw-r--r-- | tests/embed.test | 26 |
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 + |