summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/canvPs.test32
1 files changed, 31 insertions, 1 deletions
diff --git a/tests/canvPs.test b/tests/canvPs.test
index 8faad75..8ab93a0 100644
--- a/tests/canvPs.test
+++ b/tests/canvPs.test
@@ -6,7 +6,7 @@
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
-# RCS: @(#) $Id: canvPs.test,v 1.4 2002/07/14 05:48:46 dgp Exp $
+# RCS: @(#) $Id: canvPs.test,v 1.5 2002/10/10 07:25:24 hobbs Exp $
package require tcltest 2.1
namespace import -force tcltest::configure
@@ -94,6 +94,36 @@ test canvPs-2.4 {test writing to channel and file, same output} {pcOnly} {
set status
} ok
+test canvPs-3.1 {test ps generation with an embedded window} {} {
+ removeFile bar.ps
+ 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 \
+ -dash {4 4} -stipple question -outline red -fill green
+
+ image create photo logo \
+ -file [file join $tk_library images pwrdLogo150.gif]
+ .c create image 200 50 -image logo -anchor nw
+
+ entry .c.e -background pink -foreground blue -width 14
+ .c.e insert 0 "we gonna be postscripted"
+ .c create window 50 180 -anchor nw -window .c.e
+ update
+ .c postscript -file bar.ps
+ file exists bar.ps
+} 1
+test canvPs-3.2 {test ps generation with an embedded window not mapped} {} {
+ removeFile bar.ps
+ 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"
+ .c create window 50 180 -anchor nw -window .c.e
+ .c postscript -file bar.ps
+ file exists bar.ps
+} 1
+
# cleanup
removeFile foo.ps
removeFile bar.ps