From 3f909f2ee775076c14b45580c9547c369524ac42 Mon Sep 17 00:00:00 2001 From: nijtmans Date: Fri, 12 Dec 2008 00:09:37 +0000 Subject: Make error message from Tk_GetRelief the same as for Tk_GetReliefFromObj Adapt test cases for changed error message --- ChangeLog | 7 +++++++ generic/tk3d.c | 4 ++-- tests/canvas.test | 4 ++-- tests/scrollbar.test | 6 +++--- tests/textTag.test | 4 ++-- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index b715a9f..9792ac5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-11 Jan Nijtmans + * generic/tk3d.c: Make error message from Tk_GetRelief the + same as for Tk_GetReliefFromObj + * tests/canvas.test Adapt test cases for changed error message + * tests/scrollbar.test + * tests/textTag.test + 2008-12-11 Joe English * library/demos/*.tcl: Omit contraindicated [package require Ttk]. diff --git a/generic/tk3d.c b/generic/tk3d.c index e247619..daa4fcb 100644 --- a/generic/tk3d.c +++ b/generic/tk3d.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tk3d.c,v 1.23 2008/11/26 15:57:24 dkf Exp $ + * RCS: @(#) $Id: tk3d.c,v 1.24 2008/12/12 00:09:37 nijtmans Exp $ */ #include "tkInt.h" @@ -670,7 +670,7 @@ Tk_GetRelief( } else { char buf[200]; - sprintf(buf, "bad relief type \"%.50s\": must be %s", + sprintf(buf, "bad relief \"%.50s\": must be %s", name, "flat, groove, raised, ridge, solid, or sunken"); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_ERROR; diff --git a/tests/canvas.test b/tests/canvas.test index 2261a2c..3128fa9 100644 --- a/tests/canvas.test +++ b/tests/canvas.test @@ -7,7 +7,7 @@ # Copyright (c) 2008 Donal K. Fellows # All rights reserved. # -# RCS: @(#) $Id: canvas.test,v 1.27 2008/11/28 00:10:25 ferrieux Exp $ +# RCS: @(#) $Id: canvas.test,v 1.28 2008/12/12 00:09:38 nijtmans Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -139,7 +139,7 @@ test canvas-1.33 {configuration options: good value for "relief"} -body { } -result {groove} test canvas-1.34 {configuration options: bad value for "relief"} -body { .c configure -relief 1.5 -} -returnCodes error -result {bad relief type "1.5": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "1.5": must be flat, groove, raised, ridge, solid, or sunken} test canvas-1.35 {configuration options: good value for "selectbackground"} -body { .c configure -selectbackground #110022 .c cget -selectbackground diff --git a/tests/scrollbar.test b/tests/scrollbar.test index 1ba79db..43882ef 100644 --- a/tests/scrollbar.test +++ b/tests/scrollbar.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: scrollbar.test,v 1.23 2008/10/08 18:57:47 dgp Exp $ +# RCS: @(#) $Id: scrollbar.test,v 1.24 2008/12/12 00:09:38 nijtmans Exp $ package require tcltest 2.1 eval tcltest::configure $argv @@ -59,7 +59,7 @@ foreach test { {-activebackground #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} {-activerelief sunken sunken non-existent - {bad relief type "non-existent": must be flat, groove, raised, ridge, solid, or sunken}} + {bad relief "non-existent": must be flat, groove, raised, ridge, solid, or sunken}} {-background #ff0000 #ff0000 non-existent {unknown color name "non-existent"}} {-bd 4 4 badValue {bad screen distance "badValue"}} @@ -77,7 +77,7 @@ foreach test { {-orient horizontal horizontal badValue {bad orientation "badValue": must be vertical or horizontal}} {-orient horizontal horizontal bogus {bad orientation "bogus": must be vertical or horizontal}} - {-relief ridge ridge badValue {bad relief type "badValue": must be flat, groove, raised, ridge, solid, or sunken}} + {-relief ridge ridge badValue {bad relief "badValue": must be flat, groove, raised, ridge, solid, or sunken}} {-repeatdelay 140 140 129.3 {expected integer but got "129.3"}} {-repeatinterval 140 140 129.3 {expected integer but got "129.3"}} {-takefocus "any string" "any string" {} {}} diff --git a/tests/textTag.test b/tests/textTag.test index bbda6e4..94c6dbf 100644 --- a/tests/textTag.test +++ b/tests/textTag.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: textTag.test,v 1.14 2008/08/28 08:52:06 aniap Exp $ +# RCS: @(#) $Id: textTag.test,v 1.15 2008/12/12 00:09:38 nijtmans Exp $ package require tcltest 2.2 namespace import ::tcltest::* @@ -215,7 +215,7 @@ test textTag-1.23 {configuration options} -constraints { .t tag configure x -relief stupid } -cleanup { .t tag configure x -relief [lindex [.t tag configure x -relief] 3] -} -returnCodes error -result {bad relief type "stupid": must be flat, groove, raised, ridge, solid, or sunken} +} -returnCodes error -result {bad relief "stupid": must be flat, groove, raised, ridge, solid, or sunken} test textTag-1.24 {tag configuration options} -constraints { haveCourier12 } -body { -- cgit v0.12