summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 11:31:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-01-11 11:31:54 (GMT)
commitfc798d950b1eeb298b569d5e43b129d398195efc (patch)
tree63cd5d18b3efd2bcaaead5ebfd77d6e334e11490 /tests
parent321ce1ff697e622efe2530f8ab09c1eddc7b7863 (diff)
parent92c41abbd48f10bdb31acf6b98b7cf6d448c66cc (diff)
downloadtk-fc798d950b1eeb298b569d5e43b129d398195efc.zip
tk-fc798d950b1eeb298b569d5e43b129d398195efc.tar.gz
tk-fc798d950b1eeb298b569d5e43b129d398195efc.tar.bz2
Fix [d4fb4e80d220e46e588f310291fd7a4205e8cd67|d4fb4e80d2]: Image photo commands read/write/put do not accept "-" as first letter in file names resp. image data
Diffstat (limited to 'tests')
-rw-r--r--tests/imgPhoto.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/imgPhoto.test b/tests/imgPhoto.test
index d4118b0..14c3d40 100644
--- a/tests/imgPhoto.test
+++ b/tests/imgPhoto.test
@@ -226,7 +226,7 @@ test imgPhoto-4.28 {ImgPhotoCmd procedure: put option} {
list [catch {p1 put {{blahgle}}} err] $err
} {1 {can't parse color "blahgle"}}
test imgPhoto-4.29 {ImgPhotoCmd procedure: put option} {
- p1 put -to 10 10 20 20 {{white}}
+ p1 put {{white}} -to 10 10 20 20
p1 get 19 19
} {255 255 255}
test imgPhoto-4.30 {ImgPhotoCmd procedure: read option} {
@@ -440,6 +440,23 @@ test imgPhoto-4.72 {ImgPhotoCmd procedure: copy with -compositingrule} {
checkImgTrans p1 3 3
} {0 2 1 1 2 0}
catch {rename checkImgTrans {}}
+test imgPhoto-4.74 {ImgPhotoCmd procedure: put option error handling} -setup {
+ image create photo photo1
+} -body {
+ photo1 put {{white}} -to 10 10 20 20 {{white}}
+} -cleanup {
+ image delete photo1
+} -returnCodes 1 -result {wrong # args: should be "photo1 put data ?options?"}
+test imgPhoto-4.75 {<photo> read command: filename starting with '-'} -constraints {
+ hasTeapotPhoto
+} -body {
+ file copy -force $teapotPhotoFile -teapotPhotoFile
+ image create photo photo1
+ photo1 read -teapotPhotoFile
+} -cleanup {
+ image delete photo1
+ file delete ./-teapotPhotoFile
+} -result {}
test imgPhoto-5.1 {ImgPhotoGet/Free procedures, shared instances} hasTeapotPhoto {
eval image delete [image names]