diff options
Diffstat (limited to 'tk/tests/canvPs.test')
-rw-r--r-- | tk/tests/canvPs.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tk/tests/canvPs.test b/tk/tests/canvPs.test index 4eb50f88c3d..dab142f95f7 100644 --- a/tk/tests/canvPs.test +++ b/tk/tests/canvPs.test @@ -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 |