summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 20:46:58 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-01-23 20:46:58 (GMT)
commit03582e574085bb1a722ddb42239db6116db7c66a (patch)
treeb2acac1728a6dceb22148fb10c31e9f54749bad0
parentd1e742a7b7a9b4754993a7f19e61ecc674d14fa2 (diff)
downloadtk-03582e574085bb1a722ddb42239db6116db7c66a.zip
tk-03582e574085bb1a722ddb42239db6116db7c66a.tar.gz
tk-03582e574085bb1a722ddb42239db6116db7c66a.tar.bz2
Revise "bad screen distance" error-messages
-rw-r--r--generic/tkConfig.c7
-rw-r--r--generic/tkGet.c9
-rw-r--r--generic/tkObj.c6
-rw-r--r--generic/tkTextTag.c20
-rw-r--r--generic/tkUtil.c2
-rw-r--r--tests/bind.test14
-rw-r--r--tests/button.test56
-rw-r--r--tests/canvImg.test8
-rw-r--r--tests/canvMoveto.test2
-rw-r--r--tests/canvRect.test22
-rw-r--r--tests/canvText.test10
-rw-r--r--tests/canvas.test24
-rw-r--r--tests/config.test2
-rw-r--r--tests/entry.test10
-rw-r--r--tests/frame.test42
-rw-r--r--tests/grid.test10
-rw-r--r--tests/listbox.test8
-rw-r--r--tests/menu.test4
-rw-r--r--tests/menubut.test20
-rw-r--r--tests/message.test12
-rw-r--r--tests/panedwindow.test26
-rw-r--r--tests/place.test4
-rw-r--r--tests/scale.test12
-rw-r--r--tests/scrollbar.test10
-rw-r--r--tests/spinbox.test10
-rw-r--r--tests/text.test6
-rw-r--r--tests/textDisp.test2
-rw-r--r--tests/textTag.test30
-rw-r--r--tests/wm.test8
29 files changed, 204 insertions, 192 deletions
diff --git a/generic/tkConfig.c b/generic/tkConfig.c
index 17a3c28..642a9e5 100644
--- a/generic/tkConfig.c
+++ b/generic/tkConfig.c
@@ -962,8 +962,13 @@ DoObjConfig(
if (nullOK && ObjectIsEmpty(valuePtr)) {
valuePtr = NULL;
newPixels = INT_MIN;
- } else if (Tk_GetPixelsFromObj(interp, tkwin, valuePtr,
+ } else if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, valuePtr,
&newPixels) != TCL_OK) {
+ if (nullOK && interp) {
+ Tcl_AppendResult(interp, "expected screen distance or \"\" but got \"",
+ Tcl_GetString(valuePtr), "\"", NULL);
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
+ }
return TCL_ERROR;
}
if (internalPtr != NULL) {
diff --git a/generic/tkGet.c b/generic/tkGet.c
index 2b0e7ee..f96b566 100644
--- a/generic/tkGet.c
+++ b/generic/tkGet.c
@@ -601,7 +601,7 @@ Tk_GetScreenMM(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", string));
+ "expected screen distance but got \"%s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "SCREEN_DISTANCE", NULL);
}
return TCL_ERROR;
@@ -713,8 +713,9 @@ TkGetDoublePixels(
}
if (!tkwin) {
if (interp != NULL) {
- Tcl_SetObjResult(interp, Tcl_NewStringObj("bad screen", -1));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "expected screen distance but got \"%s\"", string));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
}
return TCL_ERROR;
}
@@ -729,7 +730,7 @@ TkGetDoublePixels(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", string));
+ "expected screen distance but got \"%s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "FRACTIONAL_PIXELS", NULL);
}
return TCL_ERROR;
diff --git a/generic/tkObj.c b/generic/tkObj.c
index 8978886..7a4027a 100644
--- a/generic/tkObj.c
+++ b/generic/tkObj.c
@@ -546,7 +546,7 @@ SetPixelFromAny(
error:
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%.50s\"", string));
+ "expected screen distance but got \"%s\"", string));
Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
}
return TCL_ERROR;
@@ -830,8 +830,8 @@ SetMMFromAny(
if (rest == string) {
error:
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", string));
- Tcl_SetErrorCode(interp, "TK", "VALUE", "DISTANCE", NULL);
+ "expected screen distance but got \"%s\"", string));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
return TCL_ERROR;
}
switch (*rest) {
diff --git a/generic/tkTextTag.c b/generic/tkTextTag.c
index add03c0..dd24b42 100644
--- a/generic/tkTextTag.c
+++ b/generic/tkTextTag.c
@@ -49,15 +49,21 @@ SetPixels(
Tk_Window tkwin,
Tcl_Obj **value,
char *recordPtr,
- int internalOffset,
+ Tcl_Size internalOffset,
char *oldInternalPtr,
int flags)
{
IntStruct pixel = {NULL, INT_MIN};
IntStruct *internalPtr = (IntStruct *)(recordPtr + internalOffset);
+ int nullOK = (flags & TK_OPTION_NULL_OK);
- if (!(flags & TK_OPTION_NULL_OK) || !ObjectIsEmpty(*value)) {
- if (Tk_GetPixelsFromObj(interp, tkwin, *value, &pixel.value) != TCL_OK) {
+ if (!nullOK || !ObjectIsEmpty(*value)) {
+ if (Tk_GetPixelsFromObj(nullOK ? NULL : interp, tkwin, *value, &pixel.value) != TCL_OK) {
+ if (nullOK) {
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "expected screen distance or \"\" but got \"%.50s\"", Tcl_GetString(*value)));
+ Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
+ }
return TCL_ERROR;
}
if ((flags & OPTION_NONNEG) && pixel.value < 0) {
@@ -79,7 +85,7 @@ SetBoolean(
TCL_UNUSED(Tk_Window),
Tcl_Obj **value,
char *recordPtr,
- int internalOffset,
+ Tcl_Size internalOffset,
char *oldInternalPtr,
int flags)
{
@@ -111,7 +117,7 @@ SetRelief(
TCL_UNUSED(Tk_Window),
Tcl_Obj **value,
char *recordPtr,
- int internalOffset,
+ Tcl_Size internalOffset,
char *oldInternalPtr,
int flags)
{
@@ -143,7 +149,7 @@ SetJustify(
TCL_UNUSED(Tk_Window),
Tcl_Obj **value,
char *recordPtr,
- int internalOffset,
+ Tcl_Size internalOffset,
char *oldInternalPtr,
int flags)
{
@@ -172,7 +178,7 @@ static Tcl_Obj *GetStruct(
TCL_UNUSED(void *),
TCL_UNUSED(Tk_Window),
char *recordPtr,
- int internalOffset)
+ Tcl_Size internalOffset)
{
char **structPtr = (char **)(recordPtr + internalOffset);
diff --git a/generic/tkUtil.c b/generic/tkUtil.c
index 3f07142..6099c0c 100644
--- a/generic/tkUtil.c
+++ b/generic/tkUtil.c
@@ -494,7 +494,7 @@ TkPixelParseProc(
if ((result == TCL_OK) && (clientData == NULL) && (*doublePtr < 0.0)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
- "bad screen distance \"%s\"", value));
+ "expected screen distance but got \"%s\"", value));
Tcl_SetErrorCode(interp, "TK", "VALUE", "PIXELS", NULL);
return TCL_ERROR;
}
diff --git a/tests/bind.test b/tests/bind.test
index 1439a3e..b899097 100644
--- a/tests/bind.test
+++ b/tests/bind.test
@@ -2988,7 +2988,7 @@ test bind-22.24 {HandleEventGenerate: options <Configure> -borderwidth xyz} -set
return $x
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.25 {HandleEventGenerate: options <Configure> -borderwidth 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -3230,7 +3230,7 @@ test bind-22.41 {HandleEventGenerate: options <Expose> -height xyz} -setup {
event generate .t.f <Expose> -height xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.42 {HandleEventGenerate: options <Expose> -height 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -3662,7 +3662,7 @@ test bind-22.73 {HandleEventGenerate: options <Key> -rootx xyz} -setup {
event generate .t.f <Key> -rootx xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.74 {HandleEventGenerate: options <Key> -rootx 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -3772,7 +3772,7 @@ test bind-22.81 {HandleEventGenerate: options <Key> -rooty xyz} -setup {
event generate .t.f <Key> -rooty xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.82 {HandleEventGenerate: options <Key> -rooty 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -4362,7 +4362,7 @@ test bind-22.124 {HandleEventGenerate: options <Expose> -width xyz} -setup {
event generate .t.f <Expose> -width xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.125 {HandleEventGenerate: options <Expose> -width 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -4567,7 +4567,7 @@ test bind-22.139 {HandleEventGenerate: options <Key> -x xyz} -setup {
event generate .t.f <Key> -x xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.140 {HandleEventGenerate: options <Key> -x 2i} -setup {
frame .t.f -class Test -width 150 -height 100
@@ -4733,7 +4733,7 @@ test bind-22.151 {HandleEventGenerate: options <Key> -y xyz} -setup {
event generate .t.f <Key> -y xyz
} -cleanup {
destroy .t.f
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test bind-22.152 {HandleEventGenerate: options <Key> -y 2i} -setup {
frame .t.f -class Test -width 150 -height 100
diff --git a/tests/button.test b/tests/button.test
index 5913945..b30780d 100644
--- a/tests/button.test
+++ b/tests/button.test
@@ -343,7 +343,7 @@ test button-1.34 {configuration option: "bd" for label} -setup {
.l configure -bd badValue
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.35 {configuration option: "bd" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
@@ -362,7 +362,7 @@ test button-1.36 {configuration option: "bd" for button} -setup {
.b configure -bd badValue
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.37 {configuration option: "bd" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
@@ -381,7 +381,7 @@ test button-1.38 {configuration option: "bd" for checkbutton} -setup {
.c configure -bd badValue
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.39 {configuration option: "bd" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
@@ -400,7 +400,7 @@ test button-1.40 {configuration option: "bd" for radiobutton} -setup {
.r configure -bd badValue
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.41 {configuration option: "bg" for label} -setup {
label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -574,7 +574,7 @@ test button-1.58 {configuration option: "borderwidth" for label} -setup {
.l configure -borderwidth badValue
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.59 {configuration option: "borderwidth" for button} -setup {
button .b -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
@@ -593,7 +593,7 @@ test button-1.60 {configuration option: "borderwidth" for button} -setup {
.b configure -borderwidth badValue
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.61 {configuration option: "borderwidth" for checkbutton} -setup {
checkbutton .c -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
@@ -612,7 +612,7 @@ test button-1.62 {configuration option: "borderwidth" for checkbutton} -setup {
.c configure -borderwidth badValue
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.63 {configuration option: "borderwidth" for radiobutton} -setup {
radiobutton .r -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
@@ -631,7 +631,7 @@ test button-1.64 {configuration option: "borderwidth" for radiobutton} -setup {
.r configure -borderwidth badValue
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.65 {configuration option: "command" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -1405,7 +1405,7 @@ test button-1.144 {configuration option: "highlightthickness" for label} -setup
.l configure -highlightthickness badValue
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.145 {configuration option: "highlightthickness" for button} -setup {
button .b -borderwidth 2 -font {Helvetica -12 bold}
pack .b
@@ -1424,7 +1424,7 @@ test button-1.146 {configuration option: "highlightthickness" for button} -setup
.b configure -highlightthickness badValue
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.147 {configuration option: "highlightthickness" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -font {Helvetica -12 bold}
pack .c
@@ -1443,7 +1443,7 @@ test button-1.148 {configuration option: "highlightthickness" for checkbutton} -
.c configure -highlightthickness badValue
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.149 {configuration option: "highlightthickness" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -font {Helvetica -12 bold}
pack .r
@@ -1462,7 +1462,7 @@ test button-1.150 {configuration option: "highlightthickness" for radiobutton} -
.r configure -highlightthickness badValue
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test button-1.151 {configuration option: "image" for label} -constraints {
testImageType
@@ -1810,7 +1810,7 @@ test button-1.184 {configuration option: "padx" for label} -setup {
.l configure -padx 420x
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.185 {configuration option: "padx" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
@@ -1829,7 +1829,7 @@ test button-1.186 {configuration option: "padx" for button} -setup {
.b configure -padx 420x
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.187 {configuration option: "padx" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
@@ -1848,7 +1848,7 @@ test button-1.188 {configuration option: "padx" for checkbutton} -setup {
.c configure -padx 420x
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.189 {configuration option: "padx" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
@@ -1867,7 +1867,7 @@ test button-1.190 {configuration option: "padx" for radiobutton} -setup {
.r configure -padx 420x
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.191 {configuration option: "pady" for label} -setup {
label .l -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -1887,7 +1887,7 @@ test button-1.192 {configuration option: "pady" for label} -setup {
.l configure -pady 420x
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.193 {configuration option: "pady" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
@@ -1906,7 +1906,7 @@ test button-1.194 {configuration option: "pady" for button} -setup {
.b configure -pady 420x
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.195 {configuration option: "pady" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
@@ -1925,7 +1925,7 @@ test button-1.196 {configuration option: "pady" for checkbutton} -setup {
.c configure -pady 420x
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.197 {configuration option: "pady" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
@@ -1944,7 +1944,7 @@ test button-1.198 {configuration option: "pady" for radiobutton} -setup {
.r configure -pady 420x
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test button-1.199 {configuration option: "repeatdelay" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -2600,7 +2600,7 @@ test button-1.263 {configuration option: "wraplength" for label} -setup {
.l configure -wraplength 6x
} -cleanup {
destroy .l
-} -returnCodes {error} -result {bad screen distance "6x"}
+} -returnCodes {error} -result {expected screen distance but got "6x"}
test button-1.264 {configuration option: "wraplength" for button} -setup {
button .b -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .b
@@ -2619,7 +2619,7 @@ test button-1.265 {configuration option: "wraplength" for button} -setup {
.b configure -wraplength 6x
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "6x"}
+} -returnCodes {error} -result {expected screen distance but got "6x"}
test button-1.266 {configuration option: "wraplength" for checkbutton} -setup {
checkbutton .c -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .c
@@ -2638,7 +2638,7 @@ test button-1.267 {configuration option: "wraplength" for checkbutton} -setup {
.c configure -wraplength 6x
} -cleanup {
destroy .c
-} -returnCodes {error} -result {bad screen distance "6x"}
+} -returnCodes {error} -result {expected screen distance but got "6x"}
test button-1.268 {configuration option: "wraplength" for radiobutton} -setup {
radiobutton .r -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
pack .r
@@ -2657,7 +2657,7 @@ test button-1.269 {configuration option: "wraplength" for radiobutton} -setup {
.r configure -wraplength 6x
} -cleanup {
destroy .r
-} -returnCodes {error} -result {bad screen distance "6x"}
+} -returnCodes {error} -result {expected screen distance but got "6x"}
test button-1.270 {configuration options} -body {
# Additional check to make sure that -selectcolor may be empty in
@@ -3393,14 +3393,14 @@ test button-5.20 {ConfigureButton - -width option} -body {
.b configure -width abc
} -cleanup {
destroy .b
-} -returnCodes {error} -result {bad screen distance "abc"}
+} -returnCodes {error} -result {expected screen distance but got "abc"}
test button-5.21 {ConfigureButton - -width option} -body {
button .b -bitmap questhead
catch {.b configure -width abc}
return $errorInfo
} -cleanup {
destroy .b
-} -result {bad screen distance "abc"
+} -result {expected screen distance but got "abc"
(processing -width option)
invoked from within
".b configure -width abc"}
@@ -3414,7 +3414,7 @@ test button-5.22 {ConfigureButton - -height option} -constraints {
} -cleanup {
destroy .b
image delete image1
-} -returnCodes {error} -result {bad screen distance "0.5x"}
+} -returnCodes {error} -result {expected screen distance but got "0.5x"}
test button-5.23 {ConfigureButton - -height option} -constraints {
testImageType
} -setup {
@@ -3427,7 +3427,7 @@ test button-5.23 {ConfigureButton - -height option} -constraints {
} -cleanup {
destroy .b
image delete image1
-} -result {bad screen distance "0.5x"
+} -result {expected screen distance but got "0.5x"
(processing -height option)
invoked from within
".b configure -height 0.5x"}
diff --git a/tests/canvImg.test b/tests/canvImg.test
index dbe9069..0acc735 100644
--- a/tests/canvImg.test
+++ b/tests/canvImg.test
@@ -79,12 +79,12 @@ test canvImg-2.4 {CreateImage procedure} -body {
.c create image xyz 40
} -cleanup {
.c delete all
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test canvImg-2.5 {CreateImage procedure} -body {
.c create image 50 qrs
} -cleanup {
.c delete all
-} -returnCodes {error} -result {bad screen distance "qrs"}
+} -returnCodes {error} -result {expected screen distance but got "qrs"}
test canvImg-2.6 {CreateImage procedure} -constraints testImageType -body {
.c create image 50 50 -gorp foo
} -cleanup {
@@ -109,7 +109,7 @@ test canvImg-3.2 {ImageCoords procedure} -constraints testImageType -setup {
} -cleanup {
.c delete all
image delete foo
-} -returnCodes {error} -result {bad screen distance "dumb"}
+} -returnCodes {error} -result {expected screen distance but got "dumb"}
test canvImg-3.3 {ImageCoords procedure} -constraints testImageType -setup {
image create test foo
} -body {
@@ -119,7 +119,7 @@ test canvImg-3.3 {ImageCoords procedure} -constraints testImageType -setup {
} -cleanup {
.c delete all
image delete foo
-} -returnCodes {error} -result {bad screen distance "dumb0"}
+} -returnCodes {error} -result {expected screen distance but got "dumb0"}
test canvImg-3.4 {ImageCoords procedure} -constraints testImageType -setup {
image create test foo
} -body {
diff --git a/tests/canvMoveto.test b/tests/canvMoveto.test
index 187a56d..1ff1a0c 100644
--- a/tests/canvMoveto.test
+++ b/tests/canvMoveto.test
@@ -25,7 +25,7 @@ test canvMoveto-1.3 {Bad args handling for "moveto" command} -body {
} -returnCodes error -result {wrong # args: should be ".c moveto tagOrId x y"}
test canvMoveto-1.4 {Bad args handling for "moveto" command} -body {
.c moveto test 12 y
-} -returnCodes error -result {bad screen distance "y"}
+} -returnCodes error -result {expected screen distance but got "y"}
test canvMoveto-1.5 {Bad args handling for "moveto" command} -body {
.c moveto test 12 20 -anchor
} -returnCodes error -result {wrong # args: should be ".c moveto tagOrId x y"}
diff --git a/tests/canvRect.test b/tests/canvRect.test
index c29603d..2e655e6 100644
--- a/tests/canvRect.test
+++ b/tests/canvRect.test
@@ -53,7 +53,7 @@ test canvRect-1.9 {configuration options: good value for -width} -body {
} -result {6.0 6.0}
test canvRect-1.10 {configuration options: bad value for -width} -body {
.c itemconfigure test -width abc
-} -returnCodes error -result {bad screen distance "abc"}
+} -returnCodes error -result {expected screen distance but got "abc"}
.c delete withtag all
@@ -65,16 +65,16 @@ test canvRect-2.2 {CreateRectOval procedure} -body {
} -returnCodes error -result {wrong # coordinates: expected 0 or 4, got 3}
test canvRect-2.3 {CreateRectOval procedure} -body {
.c create rectangle x 2 3 4
-} -returnCodes error -result {bad screen distance "x"}
+} -returnCodes error -result {expected screen distance but got "x"}
test canvRect-2.4 {CreateRectOval procedure} -body {
.c create rectangle 1 y 3 4
-} -returnCodes error -result {bad screen distance "y"}
+} -returnCodes error -result {expected screen distance but got "y"}
test canvRect-2.5 {CreateRectOval procedure} -body {
.c create rectangle 1 2 z 4
-} -returnCodes error -result {bad screen distance "z"}
+} -returnCodes error -result {expected screen distance but got "z"}
test canvRect-2.6 {CreateRectOval procedure} -body {
.c create rectangle 1 2 3 q
-} -returnCodes error -result {bad screen distance "q"}
+} -returnCodes error -result {expected screen distance but got "q"}
test canvRect-2.7 {CreateRectOval procedure} -body {
.c create rectangle 1 2 3 4 -tags x
set result {}
@@ -104,25 +104,25 @@ test canvRect-3.2 {RectOvalCoords procedure} -body {
.c coords x a 2 3 4
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "a"}
+} -returnCodes error -result {expected screen distance but got "a"}
test canvRect-3.3 {RectOvalCoords procedure} -body {
.c create rectangle 10 20 30 40 -tags x
.c coords x 1 b 3 4
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "b"}
+} -returnCodes error -result {expected screen distance but got "b"}
test canvRect-3.4 {RectOvalCoords procedure} -body {
.c create rectangle 10 20 30 40 -tags x
.c coords x 1 2 c 4
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "c"}
+} -returnCodes error -result {expected screen distance but got "c"}
test canvRect-3.5 {RectOvalCoords procedure} -body {
.c create rectangle 10 20 30 40 -tags x
.c coords x 1 2 3 d
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "d"}
+} -returnCodes error -result {expected screen distance but got "d"}
test canvRect-3.6 {RectOvalCoords procedure} -body {
.c create rectangle 10 20 30 40 -tags x
.c coords x 10 25 15 40
@@ -143,7 +143,7 @@ test canvRect-4.1 {ConfigureRectOval procedure} -body {
.c itemconfigure x -width abc
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "abc"}
+} -returnCodes error -result {expected screen distance but got "abc"}
test canvRect-4.2 {ConfigureRectOval procedure} -body {
.c create rectangle 10 20 30 40 -tags x -width 1
catch {.c itemconfigure x -width abc}
@@ -156,7 +156,7 @@ test canvRect-4.3 {ConfigureRectOval procedure} -body {
.c itemconfigure x -width -5
} -cleanup {
.c delete withtag all
-} -returnCodes error -result {bad screen distance "-5"}
+} -returnCodes error -result {expected screen distance but got "-5"}
test canvRect-4.4 {ConfigureRectOval procedure} -body {
.c create rectangle 10 20 30 40 -tags x -width 1
.c itemconfigure x -width 10
diff --git a/tests/canvText.test b/tests/canvText.test
index 77b2769..d685c45 100644
--- a/tests/canvText.test
+++ b/tests/canvText.test
@@ -70,7 +70,7 @@ test canvText-1.14 {configuration options: good value for "width"} -body {
} -result {6 6}
test canvasText-1.15 {configuration options: bad value for "width"} -body {
.c itemconfigure test -width xyz
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test canvText-1.16 {configuration options: good value for "tags"} -body {
.c itemconfigure test -tags {test a b c}
list [lindex [.c itemconfigure test -tags] 4] [.c itemcget test -tags]
@@ -100,12 +100,12 @@ test canvText-2.2 {CreateText procedure: args} -body {
.c create text xyz 0
} -cleanup {
.c delete all
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test canvText-2.3 {CreateText procedure: args} -body {
.c create text 0 xyz
} -cleanup {
.c delete all
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test canvText-2.4 {CreateText procedure: args} -body {
.c create text 0 0 -xyz xyz
} -cleanup {
@@ -133,14 +133,14 @@ test canvText-3.2 {TextCoords procedure} -setup {
.c coords test xyz 0
} -cleanup {
.c delete test
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test canvText-3.3 {TextCoords procedure} -setup {
.c create text 20 20 -tag test
} -body {
.c coords test 0 xyz
} -cleanup {
.c delete test
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test canvText-3.4 {TextCoords procedure} -setup {
.c create text 20 20 -tag test
} -body {
diff --git a/tests/canvas.test b/tests/canvas.test
index 6a15ad1..c06e0d2 100644
--- a/tests/canvas.test
+++ b/tests/canvas.test
@@ -40,14 +40,14 @@ test canvas-1.5 {configuration options: good value for "bd"} -body {
} -result 4
test canvas-1.6 {configuration options: bad value for "bd"} -body {
.c configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test canvas-1.7 {configuration options: good value for "borderwidth"} -body {
.c configure -borderwidth 1.3
.c cget -borderwidth
} -result 1
test canvas-1.8 {configuration options: bad value for "borderwidth"} -body {
.c configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test canvas-1.9 {configuration options: good value for "closeenough"} -body {
.c configure -closeenough 24
.c cget -closeenough
@@ -75,7 +75,7 @@ test canvas-1.15 {configuration options: good value for "height"} -body {
} -result 2
test canvas-1.16 {configuration options: bad value for "height"} -body {
.c configure -height x42
-} -returnCodes error -result {bad screen distance "x42"}
+} -returnCodes error -result {expected screen distance but got "x42"}
test canvas-1.17 {configuration options: good value for "highlightbackground"} -body {
.c configure -highlightbackground #112233
.c cget -highlightbackground
@@ -96,7 +96,7 @@ test canvas-1.21 {configuration options: good value for "highlightthickness"} -b
} -result 18
test canvas-1.22 {configuration options: bad value for "highlightthickness"} -body {
.c configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test canvas-1.23 {configuration options: good value for "insertbackground"} -body {
.c configure -insertbackground #110022
.c cget -insertbackground
@@ -110,7 +110,7 @@ test canvas-1.25 {configuration options: good value for "insertborderwidth"} -bo
} -result 1
test canvas-1.26 {configuration options: bad value for "insertborderwidth"} -body {
.c configure -insertborderwidth 2.6x
-} -returnCodes error -result {bad screen distance "2.6x"}
+} -returnCodes error -result {expected screen distance but got "2.6x"}
test canvas-1.27 {configuration options: good value for "insertofftime"} -body {
.c configure -insertofftime 100
.c cget -insertofftime
@@ -131,7 +131,7 @@ test canvas-1.31 {configuration options: good value for "insertwidth"} -body {
} -result 1
test canvas-1.32 {configuration options: bad value for "insertwidth"} -body {
.c configure -insertwidth 6x
-} -returnCodes error -result {bad screen distance "6x"}
+} -returnCodes error -result {expected screen distance but got "6x"}
test canvas-1.33 {configuration options: good value for "relief"} -body {
.c configure -relief g
.c cget -relief
@@ -152,7 +152,7 @@ test canvas-1.37 {configuration options: good value for "selectborderwidth"} -bo
} -result 1
test canvas-1.38 {configuration options: bad value for "selectborderwidth"} -body {
.c configure -selectborderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test canvas-1.39 {configuration options: good value for "selectforeground"} -body {
.c configure -selectforeground #654321
.c cget -selectforeground
@@ -170,7 +170,7 @@ test canvas-1.42 {configuration options: good value for "width"} -body {
} -result 402
test canvas-1.43 {configuration options: bad value for "width"} -body {
.c configure -width xyz
-} -returnCodes error -result {bad screen distance "xyz"}
+} -returnCodes error -result {expected screen distance but got "xyz"}
test canvas-1.44 {configuration options: good value for "xscrollcommand"} -body {
.c configure -xscrollcommand {Some command}
.c cget -xscrollcommand
@@ -884,7 +884,7 @@ test canvas-18.10 {imove method - errors} -setup {
.c imove $id 0 foobar 4
} -cleanup {
destroy .c
-} -returnCodes error -result {bad screen distance "foobar"}
+} -returnCodes error -result {expected screen distance but got "foobar"}
test canvas-18.11 {imove method - errors} -setup {
canvas .c
} -body {
@@ -892,7 +892,7 @@ test canvas-18.11 {imove method - errors} -setup {
.c imove $id 0 4 foobar
} -cleanup {
destroy .c
-} -returnCodes error -result {bad screen distance "foobar"}
+} -returnCodes error -result {expected screen distance but got "foobar"}
test canvas-19.1 {rchars method - lines} -setup {
canvas .c
@@ -1080,14 +1080,14 @@ test canvas-21.6 {canvas rotate: syntax} -setup {
.c rotate all x 1 1
} -returnCodes error -cleanup {
destroy .c
-} -result {bad screen distance "x"}
+} -result {expected screen distance but got "x"}
test canvas-21.7 {canvas rotate: syntax} -setup {
pack [canvas .c]
} -body {
.c rotate all 1 x 1
} -returnCodes error -cleanup {
destroy .c
-} -result {bad screen distance "x"}
+} -result {expected screen distance but got "x"}
test canvas-21.8 {canvas rotate: syntax} -setup {
pack [canvas .c]
} -body {
diff --git a/tests/config.test b/tests/config.test
index a128aa2..50f95e3 100644
--- a/tests/config.test
+++ b/tests/config.test
@@ -957,7 +957,7 @@ test config-4.97 {DoObjConfig - invalid pixel} -constraints testobjconfig -body
testobjconfig alltypes .foo -pixel foo
} -cleanup {
killTables
-} -returnCodes error -result {bad screen distance "foo"}
+} -returnCodes error -result {expected screen distance or "" but got "foo"}
test config-4.98 {DoObjConfig - new pixel} -constraints testobjconfig -body {
testobjconfig alltypes .foo -pixel 42m
.foo configure -pixel 3c
diff --git a/tests/entry.test b/tests/entry.test
index 6c69e37..1454104 100644
--- a/tests/entry.test
+++ b/tests/entry.test
@@ -79,7 +79,7 @@ test entry-1.4 {configuration option: "bd" for entry} -setup {
.e configure -bd badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test entry-1.5 {configuration option: "bg" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -119,7 +119,7 @@ test entry-1.8 {configuration option: "borderwidth" for entry} -setup {
.e configure -borderwidth badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test entry-1.9 {configuration option: "cursor" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -329,7 +329,7 @@ test entry-1.29 {configuration option: "highlightthickness" for entry} -setup {
.e configure -highlightthickness badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test entry-1.30 {configuration option: "insertbackground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -369,7 +369,7 @@ test entry-1.33 {configuration option: "insertborderwidth" for entry} -setup {
.e configure -insertborderwidth 2.6x
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "2.6x"}
+} -returnCodes {error} -result {expected screen distance but got "2.6x"}
test entry-1.34 {configuration option: "insertofftime" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -522,7 +522,7 @@ test entry-1.48 {configuration option: "selectborderwidth" for entry} -setup {
.e configure -selectborderwidth badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test entry-1.49 {configuration option: "selectforeground" for entry} -setup {
entry .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
diff --git a/tests/frame.test b/tests/frame.test
index 23d8e5d..74768e4 100644
--- a/tests/frame.test
+++ b/tests/frame.test
@@ -198,7 +198,7 @@ test frame-1.15 {frame configuration options} -body {
} -result 4
test frame-1.16 {frame configuration options} -body {
.f configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-1.17 {frame configuration options} -body {
.f configure -bg #00ff00
lindex [.f configure -bg] 4
@@ -216,7 +216,7 @@ test frame-1.19 {frame configuration options} -body {
} -result 1
test frame-1.20 {frame configuration options} -body {
.f configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-1.21 {frame configuration options} -body {
.f configure -cursor arrow
lindex [.f configure -cursor] 4
@@ -234,7 +234,7 @@ test frame-1.23 {frame configuration options} -body {
} -result 100
test frame-1.24 {frame configuration options} -body {
.f configure -height not_a_number
-} -returnCodes error -result {bad screen distance "not_a_number"}
+} -returnCodes error -result {expected screen distance but got "not_a_number"}
test frame-1.25 {frame configuration options} -body {
.f configure -highlightbackground #112233
lindex [.f configure -highlightbackground] 4
@@ -261,7 +261,7 @@ test frame-1.29 {frame configuration options} -body {
} -result 6
test frame-1.30 {frame configuration options} -body {
.f configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-1.31 {frame configuration options} -body {
.f configure -padx 3
lindex [.f configure -padx] 4
@@ -270,7 +270,7 @@ test frame-1.31 {frame configuration options} -body {
} -result 3
test frame-1.32 {frame configuration options} -body {
.f configure -padx badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-1.33 {frame configuration options} -body {
.f configure -pady 4
lindex [.f configure -pady] 4
@@ -279,7 +279,7 @@ test frame-1.33 {frame configuration options} -body {
} -result 4
test frame-1.34 {frame configuration options} -body {
.f configure -pady badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-1.35 {frame configuration options} -body {
.f configure -relief ridge
lindex [.f configure -relief] 4
@@ -303,7 +303,7 @@ test frame-1.38 {frame configuration options} -body {
} -result 32
test frame-1.39 {frame configuration options} -body {
.f configure -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
destroy .f
test frame-2.1 {toplevel configuration options} -setup {
@@ -503,7 +503,7 @@ test frame-2.22 {toplevel configuration options} -body {
} -result 4
test frame-2.23 {toplevel configuration options} -body {
.t configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-2.24 {toplevel configuration options} -body {
.t configure -bg #00ff00
lindex [.t configure -bg] 4
@@ -517,7 +517,7 @@ test frame-2.26 {toplevel configuration options} -body {
} -result 1
test frame-2.27 {toplevel configuration options} -body {
.t configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-2.28 {toplevel configuration options} -body {
.t configure -cursor arrow
lindex [.t configure -cursor] 4
@@ -531,7 +531,7 @@ test frame-2.30 {toplevel configuration options} -body {
} -result 100
test frame-2.31 {toplevel configuration options} -body {
.t configure -height not_a_number
-} -returnCodes error -result {bad screen distance "not_a_number"}
+} -returnCodes error -result {expected screen distance but got "not_a_number"}
test frame-2.32 {toplevel configuration options} -body {
.t configure -highlightcolor #123456
lindex [.t configure -highlightcolor] 4
@@ -545,21 +545,21 @@ test frame-2.34 {toplevel configuration options} -body {
} -result 3
test frame-2.35 {toplevel configuration options} -body {
.t configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-2.36 {toplevel configuration options} -body {
.t configure -padx 3
lindex [.t configure -padx] 4
} -result 3
test frame-2.37 {toplevel configuration options} -body {
.t configure -padx badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-2.38 {toplevel configuration options} -body {
.t configure -pady 4
lindex [.t configure -pady] 4
} -result 4
test frame-2.39 {toplevel configuration options} -body {
.t configure -pady badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-2.40 {toplevel configuration options} -body {
.t configure -relief ridge
lindex [.t configure -relief] 4
@@ -573,7 +573,7 @@ test frame-2.42 {toplevel configuration options} -body {
} -result 32
test frame-2.43 {toplevel configuration options} -body {
.t configure -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
destroy .t
test frame-3.1 {TkCreateFrame procedure} -returnCodes error -body {
@@ -1233,7 +1233,7 @@ test frame-13.12 {labelframe configuration options} -body {
} -result 4
test frame-13.13 {labelframe configuration options} -body {
.f configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-13.14 {labelframe configuration options} -body {
.f configure -bg #00ff00
lindex [.f configure -bg] 4
@@ -1251,7 +1251,7 @@ test frame-13.16 {labelframe configuration options} -body {
} -result 1
test frame-13.17 {labelframe configuration options} -body {
.f configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-13.18 {labelframe configuration options} -body {
.f configure -cursor arrow
lindex [.f configure -cursor] 4
@@ -1293,7 +1293,7 @@ test frame-13.25 {labelframe configuration options} -body {
} -result 100
test frame-13.26 {labelframe configuration options} -body {
.f configure -height not_a_number
-} -returnCodes error -result {bad screen distance "not_a_number"}
+} -returnCodes error -result {expected screen distance but got "not_a_number"}
test frame-13.27 {labelframe configuration options} -body {
.f configure -highlightbackground #112233
lindex [.f configure -highlightbackground] 4
@@ -1320,7 +1320,7 @@ test frame-13.31 {labelframe configuration options} -body {
} -result 6
test frame-13.32 {labelframe configuration options} -body {
.f configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-13.33 {labelframe configuration options} -body {
.f configure -labelanchor se
lindex [.f configure -labelanchor] 4
@@ -1338,7 +1338,7 @@ test frame-13.35 {labelframe configuration options} -body {
} -result 3
test frame-13.36 {labelframe configuration options} -body {
.f configure -padx badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-13.37 {labelframe configuration options} -body {
.f configure -pady 4
lindex [.f configure -pady] 4
@@ -1347,7 +1347,7 @@ test frame-13.37 {labelframe configuration options} -body {
} -result 4
test frame-13.38 {labelframe configuration options} -body {
.f configure -pady badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test frame-13.39 {labelframe configuration options} -body {
.f configure -relief ridge
lindex [.f configure -relief] 4
@@ -1377,7 +1377,7 @@ test frame-13.43 {labelframe configuration options} -body {
} -result 32
test frame-13.44 {labelframe configuration options} -body {
.f configure -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
destroy .f
test frame-14.1 {labelframe labelwidget option} -setup {
diff --git a/tests/grid.test b/tests/grid.test
index 27df602..afcc4c0 100644
--- a/tests/grid.test
+++ b/tests/grid.test
@@ -299,10 +299,10 @@ test grid-6.2 {location: basic argument checking} -body {
} -returnCodes error -result {bad window path name ".bad"}
test grid-6.3 {location: basic argument checking} -body {
grid location . x y
-} -returnCodes error -result {bad screen distance "x"}
+} -returnCodes error -result {expected screen distance but got "x"}
test grid-6.4 {location: basic argument checking} -body {
grid location . 1c y
-} -returnCodes error -result {bad screen distance "y"}
+} -returnCodes error -result {expected screen distance but got "y"}
test grid-6.5 {location: basic argument checking} -body {
frame .f
grid location .f 10 10
@@ -609,12 +609,12 @@ test grid-10.8 {column/row configure} -body {
grid columnconfigure . 0 -minsize foo
} -cleanup {
grid_reset 10.8
-} -returnCodes error -result {bad screen distance "foo"}
+} -returnCodes error -result {expected screen distance but got "foo"}
test grid-10.9 {column/row configure} -body {
grid columnconfigure . 0 -minsize foo
} -cleanup {
grid_reset 10.9
-} -returnCodes error -result {bad screen distance "foo"}
+} -returnCodes error -result {expected screen distance but got "foo"}
test grid-10.10 {column/row configure} -body {
grid columnconfigure . 0 -minsize 10
grid columnconfigure . 0 -minsize
@@ -641,7 +641,7 @@ test grid-10.14 {column/row configure} -body {
grid columnconfigure . 0 -pad foo
} -cleanup {
grid_reset 10.14
-} -returnCodes error -result {bad screen distance "foo"}
+} -returnCodes error -result {expected screen distance but got "foo"}
test grid-10.15 {column/row configure} -body {
grid columnconfigure . 0 -pad -3
} -cleanup {
diff --git a/tests/listbox.test b/tests/listbox.test
index e9d06e1..c02f389 100644
--- a/tests/listbox.test
+++ b/tests/listbox.test
@@ -92,7 +92,7 @@ test listbox-1.5 {configuration options} -body {
} -result {4 4}
test listbox-1.6 {configuration options} -body {
.l configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test listbox-1.7 {configuration options} -body {
.l configure -bg #ff0000
list [lindex [.l configure -bg] 4] [.l cget -bg]
@@ -110,7 +110,7 @@ test listbox-1.9 {configuration options} -body {
} -result {1 1}
test listbox-1.10 {configuration options} -body {
.l configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test listbox-1.11 {configuration options} -body {
.l configure -cursor arrow
list [lindex [.l configure -cursor] 4] [.l cget -cursor]
@@ -197,7 +197,7 @@ test listbox-1.29 {configuration options} -body {
} -result {6 6}
test listbox-1.30 {configuration options} -body {
.l configure -highlightthickness bogus
-} -returnCodes error -result {bad screen distance "bogus"}
+} -returnCodes error -result {expected screen distance but got "bogus"}
test listbox-1.31 {configuration options} -body {
.l configure -highlightthickness -2
list [lindex [.l configure -highlightthickness] 4] [.l cget -highlightthickness]
@@ -245,7 +245,7 @@ test listbox-1.37 {configuration options} -body {
} -result {1 1}
test listbox-1.38 {configuration options} -body {
.l configure -selectborderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test listbox-1.39 {configuration options} -body {
.l configure -selectforeground #654321
list [lindex [.l configure -selectforeground] 4] [.l cget -selectforeground]
diff --git a/tests/menu.test b/tests/menu.test
index 4e98e95..4041235 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -167,7 +167,7 @@ test menu-2.3 {configuration options -activeborderwidth 1.3} -body {
} -result {1.3}
test menu-2.4 {configuration options -activeborderwidth badValue} -body {
.m1 configure -activeborderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test menu-2.5 {configuration options -activeforeground #ff0000} -body {
.m1 configure -activeforeground #ff0000
@@ -207,7 +207,7 @@ test menu-2.11 {configuration options -borderwidth 1.3} -body {
} -result {1.3}
test menu-2.12 {configuration options -borderwidth badValue} -body {
.m1 configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test menu-2.13 {configuration options -cursor arrow} -body {
.m1 configure -cursor arrow
diff --git a/tests/menubut.test b/tests/menubut.test
index e5b39a2..21c0cf7 100644
--- a/tests/menubut.test
+++ b/tests/menubut.test
@@ -74,7 +74,7 @@ test menubutton-1.9 {configuration options} -body {
} -result 4
test menubutton-1.10 {configuration options} -body {
.mb configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test menubutton-1.11 {configuration options} -body {
.mb configure -bg #ff0000
.mb cget -bg
@@ -101,7 +101,7 @@ test menubutton-1.15 {configuration options} -body {
} -result 1
test menubutton-1.16 {configuration options} -body {
.mb configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test menubutton-1.17 {configuration options} -body {
.mb configure -cursor arrow
.mb cget -cursor
@@ -188,7 +188,7 @@ test menubutton-1.34 {configuration options} -body {
} -result 18
test menubutton-1.35 {configuration options} -body {
.mb configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test menubutton-1.36 {configuration options} -constraints {
testImageType
} -setup {
@@ -240,7 +240,7 @@ test menubutton-1.43 {configuration options} -body {
} -result 12
test menubutton-1.44 {configuration options} -body {
.mb configure -padx 420x
-} -returnCodes error -result {bad screen distance "420x"}
+} -returnCodes error -result {expected screen distance but got "420x"}
test menubutton-1.45 {configuration options} -body {
.mb configure -pady 12
.mb cget -pady
@@ -249,7 +249,7 @@ test menubutton-1.45 {configuration options} -body {
} -result 12
test menubutton-1.46 {configuration options} -body {
.mb configure -pady 420x
-} -returnCodes error -result {bad screen distance "420x"}
+} -returnCodes error -result {expected screen distance but got "420x"}
test menubutton-1.47 {configuration options} -body {
.mb configure -relief groove
.mb cget -relief
@@ -312,7 +312,7 @@ test menubutton-1.58 {configuration options} -body {
} -result 100
test menubutton-1.59 {configuration options} -body {
.mb configure -wraplength 6x
-} -returnCodes error -result {bad screen distance "6x"}
+} -returnCodes error -result {expected screen distance but got "6x"}
deleteWindows
@@ -436,7 +436,7 @@ test menubutton-4.5 {ConfigureMenuButton procedure} -setup {
.mb1 configure -width abc
} -cleanup {
deleteWindows
-} -returnCodes error -result {bad screen distance "abc"}
+} -returnCodes error -result {expected screen distance but got "abc"}
test menubutton-4.6 {ConfigureMenuButton procedure} -setup {
deleteWindows
} -body {
@@ -445,7 +445,7 @@ test menubutton-4.6 {ConfigureMenuButton procedure} -setup {
return $errorInfo
} -cleanup {
deleteWindows
-} -result {bad screen distance "abc"
+} -result {expected screen distance but got "abc"
(processing -width option)
invoked from within
".mb1 configure -width abc"}
@@ -462,7 +462,7 @@ test menubutton-4.7 {ConfigureMenuButton procedure} -constraints {
} -cleanup {
deleteWindows
imageCleanup
-} -returnCodes error -result {bad screen distance "0.5x"}
+} -returnCodes error -result {expected screen distance but got "0.5x"}
test menubutton-4.8 {ConfigureMenuButton procedure} -constraints {
testImageType
} -setup {
@@ -476,7 +476,7 @@ test menubutton-4.8 {ConfigureMenuButton procedure} -constraints {
} -cleanup {
deleteWindows
imageCleanup
-} -result {bad screen distance "0.5x"
+} -result {expected screen distance but got "0.5x"
(processing -height option)
invoked from within
".mb1 configure -height 0.5x"}
diff --git a/tests/message.test b/tests/message.test
index 941d8c8..4e9ad59 100644
--- a/tests/message.test
+++ b/tests/message.test
@@ -90,7 +90,7 @@ test message-1.8 {configuration option: "bd"} -setup {
.m configure -bd badValue
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test message-1.9 {configuration option: "bg"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -130,7 +130,7 @@ test message-1.12 {configuration option: "borderwidth"} -setup {
.m configure -borderwidth badValue
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test message-1.13 {configuration option: "cursor"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -270,7 +270,7 @@ test message-1.26 {configuration option: "highlightthickness"} -setup {
.m configure -highlightthickness badValue
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test message-1.27 {configuration option: "justify"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -310,7 +310,7 @@ test message-1.30 {configuration option: "padx"} -setup {
.m configure -padx 420x
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test message-1.31 {configuration option: "pady"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -330,7 +330,7 @@ test message-1.32 {configuration option: "pady"} -setup {
.m configure -pady 420x
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "420x"}
+} -returnCodes {error} -result {expected screen distance but got "420x"}
test message-1.33 {configuration option: "relief"} -setup {
message .m -borderwidth 2 -highlightthickness 2 -font {Helvetica -12 bold}
@@ -392,7 +392,7 @@ test message-1.38 {configuration option: "width"} -setup {
.m configure -width badValue
} -cleanup {
destroy .m
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test message-2.1 {Tk_MessageObjCmd procedure} -body {
diff --git a/tests/panedwindow.test b/tests/panedwindow.test
index e302b5d..96ddce3 100644
--- a/tests/panedwindow.test
+++ b/tests/panedwindow.test
@@ -34,7 +34,7 @@ test panedwindow-1.3 {configuration options: -bd (good)} -body {
} -result {4 4}
test panedwindow-1.4 {configuration options: -bd (bad)} -body {
.p configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.5 {configuration options: -bg (good)} -body {
.p configure -bg #ff0000
list [lindex [.p configure -bg] 4] [.p cget -bg]
@@ -52,7 +52,7 @@ test panedwindow-1.7 {configuration options: -borderwidth (good)} -body {
} -result {1 1}
test panedwindow-1.8 {configuration options: -borderwidth (bad)} -body {
.p configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.9 {configuration options: -cursor (good)} -body {
.p configure -cursor arrow
list [lindex [.p configure -cursor] 4] [.p cget -cursor]
@@ -70,7 +70,7 @@ test panedwindow-1.11 {configuration options: -handlesize (good)} -body {
} -result {20 20}
test panedwindow-1.12 {configuration options: -handlesize (bad)} -body {
.p configure -handlesize badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.13 {configuration options: -height (good)} -body {
.p configure -height 20
list [lindex [.p configure -height] 4] [.p cget -height]
@@ -79,7 +79,7 @@ test panedwindow-1.13 {configuration options: -height (good)} -body {
} -result {20 20}
test panedwindow-1.14 {configuration options: -height (bad)} -body {
.p configure -height badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance or "" but got "badValue"}
test panedwindow-1.15 {configuration options: -opaqueresize (good)} -body {
.p configure -opaqueresize true
list [lindex [.p configure -opaqueresize] 4] [.p cget -opaqueresize]
@@ -115,7 +115,7 @@ test panedwindow-1.21 {configuration options: -proxyborderwidth (good)} -body {
} -result {1.3 1.3}
test panedwindow-1.22 {configuration options: -proxyborderwidth (bad)} -body {
.p configure -proxyborderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.23 {configuration options: -proxyrelief (good)} -body {
.p configure -proxyrelief groove
list [lindex [.p configure -proxyrelief] 4] [.p cget -proxyrelief]
@@ -151,7 +151,7 @@ test panedwindow-1.29 {configuration options: -sashpad (good)} -body {
} -result {1 1}
test panedwindow-1.30 {configuration options: -sashpad (bad)} -body {
.p configure -sashpad badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.31 {configuration options: -sashrelief (good)} -body {
.p configure -sashrelief groove
list [lindex [.p configure -sashrelief] 4] [.p cget -sashrelief]
@@ -169,7 +169,7 @@ test panedwindow-1.33 {configuration options: -sashwidth (good)} -body {
} -result {10 10}
test panedwindow-1.34 {configuration options: -sashwidth (bad)} -body {
.p configure -sashwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.35 {configuration options: -showhandle (good)} -body {
.p configure -showhandle true
list [lindex [.p configure -showhandle] 4] [.p cget -showhandle]
@@ -187,7 +187,7 @@ test panedwindow-1.37 {configuration options: -width (good)} -body {
} -result {402 402}
test panedwindow-1.38 {configuration options: -width (bad)} -body {
.p configure -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance or "" but got "badValue"}
test panedwindow-1.39 {configuration options: -after (good)} -body {
.p paneconfigure .b -after .c
@@ -218,7 +218,7 @@ test panedwindow-1.43 {configuration options: -height (good)} -body {
} -result {10 10}
test panedwindow-1.44 {configuration options: -height (bad)} -body {
.p paneconfigure .b -height badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance or "" but got "badValue"}
test panedwindow-1.45 {configuration options: -hide (good)} -body {
.p paneconfigure .b -hide false
list [lindex [.p paneconfigure .b -hide] 4] \
@@ -238,7 +238,7 @@ test panedwindow-1.47 {configuration options: -minsize (good)} -body {
} -result {10 10}
test panedwindow-1.48 {configuration options: -minsize (bad)} -body {
.p paneconfigure .b -minsize badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.49 {configuration options: -padx (good)} -body {
.p paneconfigure .b -padx 1.3
list [lindex [.p paneconfigure .b -padx] 4] \
@@ -248,7 +248,7 @@ test panedwindow-1.49 {configuration options: -padx (good)} -body {
} -result {1 1}
test panedwindow-1.50 {configuration options: -padx (bad)} -body {
.p paneconfigure .b -padx badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.51 {configuration options: -pady (good)} -body {
.p paneconfigure .b -pady 1.3
list [lindex [.p paneconfigure .b -pady] 4] \
@@ -258,7 +258,7 @@ test panedwindow-1.51 {configuration options: -pady (good)} -body {
} -result {1 1}
test panedwindow-1.52 {configuration options: -pady (bad)} -body {
.p paneconfigure .b -pady badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test panedwindow-1.53 {configuration options: -sticky (good)} -body {
.p paneconfigure .b -sticky nsew
list [lindex [.p paneconfigure .b -sticky] 4] \
@@ -288,7 +288,7 @@ test panedwindow-1.57 {configuration options: -width (good)} -body {
} -result {10 10}
test panedwindow-1.58 {configuration options: -width (bad)} -body {
.p paneconfigure .b -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance or "" but got "badValue"}
deleteWindows
diff --git a/tests/place.test b/tests/place.test
index a9df43d..fae275a 100644
--- a/tests/place.test
+++ b/tests/place.test
@@ -58,7 +58,7 @@ test place-1.3 {Tk_PlaceCmd procedure, "info" option} -setup {
test place-2.1 {ConfigureContent procedure, -height option} -body {
place .t.f2 -height abcd
-} -returnCodes error -result {bad screen distance "abcd"}
+} -returnCodes error -result {expected screen distance or "" but got "abcd"}
test place-2.2 {ConfigureContent procedure, -height option} -setup {
place forget .t.f2
} -body {
@@ -164,7 +164,7 @@ test place-5.3 {ConfigureContent procedure, -relwidth option} -setup {
test place-6.1 {ConfigureContent procedure, -width option} -body {
place .t.f2 -width abcd
-} -returnCodes error -result {bad screen distance "abcd"}
+} -returnCodes error -result {expected screen distance or "" but got "abcd"}
test place-6.2 {ConfigureContent procedure, -width option} -setup {
place forget .t.f2
} -body {
diff --git a/tests/scale.test b/tests/scale.test
index 53e7f72..55abe0e 100644
--- a/tests/scale.test
+++ b/tests/scale.test
@@ -49,7 +49,7 @@ test scale-1.5 {configuration options} -body {
} -result 4
test scale-1.6 {configuration options} -body {
.s configure -bd badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test scale-1.7 {configuration options} -body {
.s configure -bigincrement 12.5
.s cget -bigincrement
@@ -76,7 +76,7 @@ test scale-1.11 {configuration options} -body {
} -result 1
test scale-1.12 {configuration options} -body {
.s configure -borderwidth badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test scale-1.13 {configuration options} -body {
.s configure -command {set x}
.s cget -command
@@ -160,7 +160,7 @@ test scale-1.31 {configuration options} -body {
} -result 2
test scale-1.32 {configuration options} -body {
.s configure -highlightthickness badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test scale-1.33 {configuration options} -body {
.s configure -label {Some text}
.s cget -label
@@ -175,7 +175,7 @@ test scale-1.35 {configuration options} -body {
} -result 130
test scale-1.36 {configuration options} -body {
.s configure -length badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test scale-1.37 {configuration options} -body {
.s configure -orient horizontal
.s cget -orient
@@ -244,7 +244,7 @@ test scale-1.51 {configuration options} -body {
} -result 86
test scale-1.52 {configuration options} -body {
.s configure -sliderlength badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
test scale-1.53 {configuration options} -body {
.s configure -sliderrelief raised
.s cget -sliderrelief
@@ -316,7 +316,7 @@ test scale-1.69 {configuration options} -body {
} -result 32
test scale-1.70 {configuration options} -body {
.s configure -width badValue
-} -returnCodes error -result {bad screen distance "badValue"}
+} -returnCodes error -result {expected screen distance but got "badValue"}
destroy .s
diff --git a/tests/scrollbar.test b/tests/scrollbar.test
index 2548009..061eacc 100644
--- a/tests/scrollbar.test
+++ b/tests/scrollbar.test
@@ -75,16 +75,16 @@ foreach test {
{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"}}
+ {-bd 4 4 badValue {expected screen distance but got "badValue"}}
{-bg #ff0000 #ff0000 non-existent
{unknown color name "non-existent"}}
- {-borderwidth 1.3 1 badValue {bad screen distance "badValue"}}
+ {-borderwidth 1.3 1 badValue {expected screen distance but got "badValue"}}
{-command "set x" {set x} {} {}}
- {-elementborderwidth 4 4 badValue {bad screen distance "badValue"}}
+ {-elementborderwidth 4 4 badValue {expected screen distance but got "badValue"}}
{-cursor arrow arrow badValue {bad cursor spec "badValue"}}
{-highlightbackground #112233 #112233 ugly {unknown color name "ugly"}}
{-highlightcolor #123456 #123456 bogus {unknown color name "bogus"}}
- {-highlightthickness 6 6 bogus {bad screen distance "bogus"}}
+ {-highlightthickness 6 6 bogus {expected screen distance but got "bogus"}}
{-highlightthickness -2 0 {} {}}
{-jump true 1 silly {expected boolean value but got "silly"}}
{-orient horizontal horizontal badValue
@@ -95,7 +95,7 @@ foreach test {
{-repeatinterval 140 140 129.3 {expected integer but got "129.3"}}
{-takefocus "any string" "any string" {} {}}
{-troughcolor #432 #432 lousy {unknown color name "lousy"}}
- {-width 32 32 badValue {bad screen distance "badValue"}}
+ {-width 32 32 badValue {expected screen distance but got "badValue"}}
} {
lassign $test name value okResult badValue badResult
# Assume $name is plain; true of all our in-use options!
diff --git a/tests/spinbox.test b/tests/spinbox.test
index 22962b6..7a3c06a 100644
--- a/tests/spinbox.test
+++ b/tests/spinbox.test
@@ -104,7 +104,7 @@ test spinbox-1.6 {configuration option: "bd" for spinbox} -setup {
.e configure -bd badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test spinbox-1.7 {configuration option: "bg"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
@@ -148,7 +148,7 @@ test spinbox-1.10 {configuration option: "borderwidth" for spinbox} -setup {
.e configure -borderwidth badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test spinbox-1.11 {configuration option: "buttonbackground"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
@@ -468,7 +468,7 @@ test spinbox-1.39 {configuration option: "highlightthickness" for spinbox} -setu
.e configure -highlightthickness bogus
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "bogus"}
+} -returnCodes {error} -result {expected screen distance but got "bogus"}
test spinbox-1.40 {configuration option: "highlightthickness"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
@@ -546,7 +546,7 @@ test spinbox-1.46 {configuration option: "insertborderwidth" for spinbox} -setup
.e configure -insertborderwidth 2.6x
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "2.6x"}
+} -returnCodes {error} -result {expected screen distance but got "2.6x"}
test spinbox-1.47 {configuration option: "insertofftime"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
@@ -768,7 +768,7 @@ test spinbox-1.66 {configuration option: "selectborderwidth" for spinbox} -setup
.e configure -selectborderwidth badValue
} -cleanup {
destroy .e
-} -returnCodes {error} -result {bad screen distance "badValue"}
+} -returnCodes {error} -result {expected screen distance but got "badValue"}
test spinbox-1.67 {configuration option: "selectforeground"} -setup {
spinbox .e -borderwidth 2 -highlightthickness 2 -font {Helvetica -12} \
diff --git a/tests/text.test b/tests/text.test
index 11d8b57..5f574c0 100644
--- a/tests/text.test
+++ b/tests/text.test
@@ -3389,7 +3389,7 @@ test text-14.11 {ConfigureText procedure} -setup {
.t configure -selectborderwidth foo
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad screen distance "foo"}
+} -returnCodes {error} -result {expected screen distance or "" but got "foo"}
test text-14.12 {ConfigureText procedure} -body {
text .t
entry .t.e
@@ -6126,7 +6126,7 @@ test text-23.2 {TkTextGetTabs procedure} -setup {
.t configure -tabs xyz
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad screen distance "xyz"}
+} -returnCodes {error} -result {expected screen distance but got "xyz"}
test text-23.3 {TkTextGetTabs procedure} -setup {
text .t -highlightthickness 0 -bd 0 -relief flat -padx 0 -width 150
pack .t
@@ -6183,7 +6183,7 @@ test text-23.7 {TkTextGetTabs procedure} -setup {
.t configure -tabs {100 !44 200 lork}
} -cleanup {
destroy .t
-} -returnCodes {error} -result {bad screen distance "!44"}
+} -returnCodes {error} -result {expected screen distance but got "!44"}
test text-24.1 {TextDumpCmd procedure, bad args} -body {
diff --git a/tests/textDisp.test b/tests/textDisp.test
index 03a0ceb..7583bc4 100644
--- a/tests/textDisp.test
+++ b/tests/textDisp.test
@@ -2483,7 +2483,7 @@ test textDisp-16.37 {TkTextYviewCmd procedure} {
} {0 {}}
test textDisp-16.38 {TkTextYviewCmd procedure} {
list [catch {.t yview scroll 1.3blah pixels} msg] $msg
-} {1 {bad screen distance "1.3blah"}}
+} {1 {expected screen distance but got "1.3blah"}}
test textDisp-16.39 {TkTextYviewCmd procedure} {
list [catch {.t yview scroll 1.3i pixels} msg] $msg
} {0 {}}
diff --git a/tests/textTag.test b/tests/textTag.test
index cf4dd7e..5d58cb0 100644
--- a/tests/textTag.test
+++ b/tests/textTag.test
@@ -78,7 +78,7 @@ test textTag-1.6 {configuration options} -body {
.t tag configure x -borderwidth 46q
} -cleanup {
.t tag configure x -borderwidth [lindex [.t tag configure x -borderwidth] 3]
-} -returnCodes error -result {bad screen distance "46q"}
+} -returnCodes error -result {expected screen distance or "" but got "46q"}
test textTag-1.7 {tag configuration options} -body {
.t tag configure x -fgstipple gray25
.t tag cget x -fgstipple
@@ -130,7 +130,7 @@ test textTag-1.15 {configuration options} -body {
.t tag configure x -lmargin1 bad
} -cleanup {
.t tag configure x -lmargin1 [lindex [.t tag configure x -lmargin1] 3]
-} -returnCodes error -result {bad screen distance "bad"}
+} -returnCodes error -result {expected screen distance or "" but got "bad"}
test textTag-1.16 {tag configuration options} -body {
.t tag configure x -lmargin2 10
.t tag cget x -lmargin2
@@ -141,7 +141,7 @@ test textTag-1.17 {configuration options} -body {
.t tag configure x -lmargin2 bad
} -cleanup {
.t tag configure x -lmargin2 [lindex [.t tag configure x -lmargin2] 3]
-} -returnCodes error -result {bad screen distance "bad"}
+} -returnCodes error -result {expected screen distance or "" but got "bad"}
test textTag-1.17a {tag configuration options} -body {
.t tag configure x -lmargincolor lightgreen
.t tag cget x -lmargincolor
@@ -163,7 +163,7 @@ test textTag-1.19 {configuration options} -body {
.t tag configure x -offset 100xyz
} -cleanup {
.t tag configure x -offset [lindex [.t tag configure x -offset] 3]
-} -returnCodes error -result {bad screen distance "100xyz"}
+} -returnCodes error -result {expected screen distance or "" but got "100xyz"}
test textTag-1.20 {tag configuration options} -body {
.t tag configure x -overstrike on
.t tag cget x -overstrike
@@ -207,7 +207,7 @@ test textTag-1.25 {configuration options} -body {
.t tag configure x -rmargin bad
} -cleanup {
.t tag configure x -rmargin [lindex [.t tag configure x -rmargin] 3]
-} -returnCodes error -result {bad screen distance "bad"}
+} -returnCodes error -result {expected screen distance or "" but got "bad"}
test textTag-1.25a {tag configuration options} -body {
.t tag configure x -rmargincolor darkblue
.t tag cget x -rmargincolor
@@ -251,7 +251,7 @@ test textTag-1.27 {configuration options} -body {
.t tag configure x -spacing1 bad
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3]
-} -returnCodes error -result {bad screen distance "bad"}
+} -returnCodes error -result {expected screen distance or "" but got "bad"}
test textTag-1.28 {tag configuration options} -body {
.t tag configure x -spacing2 10
.t tag cget x -spacing2
@@ -263,7 +263,7 @@ test textTag-1.29 {configuration options, bug [026e2bb685]} -body {
list $msg [.t tag configure x -spacing1] [.t tag configure x -spacing2] [.t tag configure x -spacing3]
} -cleanup {
.t tag configure x -spacing1 [lindex [.t tag configure x -spacing1] 3] -spacing2 [lindex [.t tag configure x -spacing2] 3] -spacing3 [lindex [.t tag configure x -spacing3] 3]
-} -result {{bad screen distance "bad"} {-spacing1 {} {} {} {}} {-spacing2 {} {} {} {}} {-spacing3 {} {} {} 5}}
+} -result {{expected screen distance or "" but got "bad"} {-spacing1 {} {} {} {}} {-spacing2 {} {} {} {}} {-spacing3 {} {} {} 5}}
test textTag-1.30 {tag configuration options} -body {
.t tag configure x -spacing3 10
.t tag cget x -spacing3
@@ -274,7 +274,7 @@ test textTag-1.31 {configuration options} -body {
.t tag configure x -spacing3 bad
} -cleanup {
.t tag configure x -spacing3 [lindex [.t tag configure x -spacing3] 3]
-} -returnCodes error -result {bad screen distance "bad"}
+} -returnCodes error -result {expected screen distance or "" but got "bad"}
test textTag-1.32 {tag configuration options} -body {
.t tag configure x -tabs {10 20 30}
.t tag cget x -tabs
@@ -566,7 +566,7 @@ test textTag-5.12 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -offset 1.0q
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "1.0q"}
+} -returnCodes error -result {expected screen distance or "" but got "1.0q"}
test textTag-5.13 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargin1 2 -lmargin2 4 -rmargin 5 \
@@ -585,13 +585,13 @@ test textTag-5.14 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -lmargin1 2.0x
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "2.0x"}
+} -returnCodes error -result {expected screen distance or "" but got "2.0x"}
test textTag-5.15 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargin2 gorp
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "gorp"}
+} -returnCodes error -result {expected screen distance or "" but got "gorp"}
test textTag-5.15a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -lmargincolor rainbow
@@ -603,7 +603,7 @@ test textTag-5.16 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -rmargin 140.1.1
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "140.1.1"}
+} -returnCodes error -result {expected screen distance or "" but got "140.1.1"}
test textTag-5.16a {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -rmargincolor rainbow
@@ -624,19 +624,19 @@ test textTag-5.18 {TkTextTagCmd - "configure" option} -body {
.t tag configure x -spacing1 2.0x
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "2.0x"}
+} -returnCodes error -result {expected screen distance or "" but got "2.0x"}
test textTag-5.19 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 lousy
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "lousy"}
+} -returnCodes error -result {expected screen distance or "" but got "lousy"}
test textTag-5.20 {TkTextTagCmd - "configure" option} -body {
.t tag delete x
.t tag configure x -spacing1 4.2.3
} -cleanup {
.t tag delete x
-} -returnCodes error -result {bad screen distance "4.2.3"}
+} -returnCodes error -result {expected screen distance or "" but got "4.2.3"}
test textTag-5.21 {TkTextTagCmd - "configure" option} -body {
.t configure -selectborderwidth 2 -selectforeground blue \
-selectbackground black
diff --git a/tests/wm.test b/tests/wm.test
index 81d423f..d913006 100644
--- a/tests/wm.test
+++ b/tests/wm.test
@@ -1109,10 +1109,10 @@ test wm-maxsize-1.3 {usage} -returnCodes error -body {
} -result {wrong # args: should be "wm maxsize window ?width height?"}
test wm-maxsize-1.4 {usage} -returnCodes error -body {
wm maxsize . x 100
-} -result {bad screen distance "x"}
+} -result {expected screen distance but got "x"}
test wm-maxsize-1.5 {usage} -returnCodes error -body {
wm maxsize . 100 bogus
-} -result {bad screen distance "bogus"}
+} -result {expected screen distance but got "bogus"}
test wm-maxsize-1.6 {usage} -setup {
destroy .t2
} -body {
@@ -1209,10 +1209,10 @@ test wm-minsize-1.3 {usage} -returnCodes error -body {
} -result {wrong # args: should be "wm minsize window ?width height?"}
test wm-minsize-1.4 {usage} -returnCodes error -body {
wm minsize . x 100
-} -result {bad screen distance "x"}
+} -result {expected screen distance but got "x"}
test wm-minsize-1.5 {usage} -returnCodes error -body {
wm minsize . 100 bogus
-} -result {bad screen distance "bogus"}
+} -result {expected screen distance but got "bogus"}
test wm-minsize-1.6 {usage} -setup {
destroy .t2
} -body {