diff options
author | dgp <dgp@users.sourceforge.net> | 2008-10-09 17:20:00 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2008-10-09 17:20:00 (GMT) |
commit | c56604b787456f11913887c485599b775b0ff04e (patch) | |
tree | 5fcc75ae7bbd3d4ab9b8f15de5d0eda38fde886d /tests | |
parent | dbc889981b7f5414f827865b148399d7f0f92185 (diff) | |
download | tk-c56604b787456f11913887c485599b775b0ff04e.zip tk-c56604b787456f11913887c485599b775b0ff04e.tar.gz tk-c56604b787456f11913887c485599b775b0ff04e.tar.bz2 |
Restored test naming consistency with Tk 8.5 tests.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/entry.test | 237 |
1 files changed, 123 insertions, 114 deletions
diff --git a/tests/entry.test b/tests/entry.test index a628b84..b097ab7 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: entry.test,v 1.25 2008/10/06 23:13:19 patthoyts Exp $ +# RCS: @(#) $Id: entry.test,v 1.26 2008/10/09 17:20:00 dgp Exp $ package require tcltest 2.2 namespace import ::tcltest::* @@ -650,13 +650,13 @@ test entry-2.4 {Tk_EntryCmd procedure} -body { } -cleanup { destroy .e } -returnCodes error -result {unknown option "-gorp"} -test entry-2.5 {Tk_EntryCmd procedure} -body { +test entry-2.4.1 {Tk_EntryCmd procedure} -body { catch {entry .e -gorp foo} list [winfo exists .e] [info commands .e] } -cleanup { destroy .e } -result {0 {}} -test entry-2.6 {Tk_EntryCmd procedure} -body { +test entry-2.5 {Tk_EntryCmd procedure} -body { entry .e } -cleanup { destroy .e @@ -920,7 +920,7 @@ test entry-3.26 {EntryWidgetCmd procedure, "delete" widget command} -setup { } -cleanup { destroy .e } -result {01234567890} -test entry-3.27 {EntryWidgetCmd procedure, "delete" widget command} -setup { +test entry-3.26a {EntryWidgetCmd procedure, "delete" widget command} -setup { entry .e pack .e update @@ -933,28 +933,28 @@ test entry-3.27 {EntryWidgetCmd procedure, "delete" widget command} -setup { } -cleanup { destroy .e } -result {01234567890} -test entry-3.28 {EntryWidgetCmd procedure, "get" widget command} -setup { +test entry-3.27 {EntryWidgetCmd procedure, "get" widget command} -setup { entry .e } -body { .e get foo } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e get"} -test entry-3.29 {EntryWidgetCmd procedure, "icursor" widget command} -setup { +test entry-3.28 {EntryWidgetCmd procedure, "icursor" widget command} -setup { entry .e } -body { .e icursor } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e icursor pos"} -test entry-3.30 {EntryWidgetCmd procedure, "icursor" widget command} -setup { +test entry-3.29 {EntryWidgetCmd procedure, "icursor" widget command} -setup { entry .e } -body { .e icursor foo } -cleanup { destroy .e } -returnCodes error -result {bad entry index "foo"} -test entry-3.31 {EntryWidgetCmd procedure, "icursor" widget command} -setup { +test entry-3.30 {EntryWidgetCmd procedure, "icursor" widget command} -setup { entry .e } -body { .e insert end "01234567890" @@ -963,28 +963,28 @@ test entry-3.31 {EntryWidgetCmd procedure, "icursor" widget command} -setup { } -cleanup { destroy .e } -result {4} -test entry-3.32 {EntryWidgetCmd procedure, "index" widget command} -setup { +test entry-3.31 {EntryWidgetCmd procedure, "index" widget command} -setup { entry .e } -body { .e in } -cleanup { destroy .e } -returnCodes error -result {ambiguous option "in": must be bbox, cget, configure, delete, get, icursor, index, insert, scan, selection, validate, or xview} -test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup { +test entry-3.32 {EntryWidgetCmd procedure, "index" widget command} -setup { entry .e } -body { .e index } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e index string"} -test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup { +test entry-3.33 {EntryWidgetCmd procedure, "index" widget command} -setup { entry .e } -body { .e index foo } -cleanup { destroy .e } -returnCodes error -result {bad entry index "foo"} -test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup { +test entry-3.34 {EntryWidgetCmd procedure, "index" widget command} -setup { entry .e pack .e update @@ -993,7 +993,7 @@ test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup { } -cleanup { destroy .e } -returnCodes {ok} -match glob -result {*} -test entry-3.36 {EntryWidgetCmd procedure, "index" widget command} -setup { +test entry-3.35 {EntryWidgetCmd procedure, "index" widget command} -setup { entry .e pack .e update @@ -1004,28 +1004,28 @@ test entry-3.36 {EntryWidgetCmd procedure, "index" widget command} -setup { } -cleanup { destroy .e } -result {3 4 8} -test entry-3.37 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.36 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e } -body { .e insert a } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e insert index text"} -test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.37 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e } -body { .e insert a b c } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e insert index text"} -test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.38 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e } -body { .e insert foo Text } -cleanup { destroy .e } -returnCodes error -result {bad entry index "foo"} -test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.39 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e pack .e update @@ -1036,7 +1036,7 @@ test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup { } -cleanup { destroy .e } -result {012xxx34567890} -test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.40 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e pack .e update @@ -1049,7 +1049,7 @@ test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup { } -cleanup { destroy .e } -result {01234567890} -test entry-3.42 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.40a {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e pack .e update @@ -1062,14 +1062,14 @@ test entry-3.42 {EntryWidgetCmd procedure, "insert" widget command} -setup { } -cleanup { destroy .e } -result {01234567890} -test entry-3.43 {EntryWidgetCmd procedure, "insert" widget command} -setup { +test entry-3.41 {EntryWidgetCmd procedure, "insert" widget command} -setup { entry .e } -body { .e insert a b c } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e insert index text"} -test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup { +test entry-3.42 {EntryWidgetCmd procedure, "scan" widget command} -setup { entry .e pack .e update @@ -1078,7 +1078,7 @@ test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"} -test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup { +test entry-3.43 {EntryWidgetCmd procedure, "scan" widget command} -setup { entry .e pack .e update @@ -1087,7 +1087,7 @@ test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e scan mark|dragto x"} -test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -setup { +test entry-3.44 {EntryWidgetCmd procedure, "scan" widget command} -setup { entry .e pack .e update @@ -1096,7 +1096,7 @@ test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {bad scan option "foobar": must be mark or dragto} -test entry-3.47 {EntryWidgetCmd procedure, "scan" widget command} -setup { +test entry-3.45 {EntryWidgetCmd procedure, "scan" widget command} -setup { entry .e pack .e update @@ -1107,7 +1107,7 @@ test entry-3.47 {EntryWidgetCmd procedure, "scan" widget command} -setup { } -returnCodes error -result {expected integer but got "20.1"} # This test is non-portable because character sizes vary. -test entry-3.48 {EntryWidgetCmd procedure, "scan" widget command} -constraints { +test entry-3.46 {EntryWidgetCmd procedure, "scan" widget command} -constraints { fonts } -setup { entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2 @@ -1122,14 +1122,14 @@ test entry-3.48 {EntryWidgetCmd procedure, "scan" widget command} -constraints { } -cleanup { destroy .e } -result {2} -test entry-3.49 {EntryWidgetCmd procedure, "select" widget command} -setup { +test entry-3.47 {EntryWidgetCmd procedure, "select" widget command} -setup { entry .e } -body { .e select } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection option ?index?"} -test entry-3.50 {EntryWidgetCmd procedure, "select" widget command} -setup { +test entry-3.48 {EntryWidgetCmd procedure, "select" widget command} -setup { entry .e } -body { .e select foo @@ -1137,14 +1137,14 @@ test entry-3.50 {EntryWidgetCmd procedure, "select" widget command} -setup { destroy .e } -returnCodes error -result {bad selection option "foo": must be adjust, clear, from, present, range, or to} -test entry-3.51 {EntryWidgetCmd procedure, "select clear" widget command} -setup { +test entry-3.49 {EntryWidgetCmd procedure, "select clear" widget command} -setup { entry .e } -body { .e select clear gorp } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection clear"} -test entry-3.52 {EntryWidgetCmd procedure, "select clear" widget command} -setup { +test entry-3.50 {EntryWidgetCmd procedure, "select clear" widget command} -setup { entry .e } -body { .e insert end "0123456789" @@ -1156,7 +1156,7 @@ test entry-3.52 {EntryWidgetCmd procedure, "select clear" widget command} -setup } -cleanup { destroy .e } -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined} -test entry-3.53 {EntryWidgetCmd procedure, "select clear" widget command} -setup { +test entry-3.50.1 {EntryWidgetCmd procedure, "select clear" widget command} -setup { entry .e pack .e update @@ -1172,14 +1172,14 @@ test entry-3.53 {EntryWidgetCmd procedure, "select clear" widget command} -setup destroy .e } -result {.e} -test entry-3.54 {EntryWidgetCmd procedure, "selection present" widget command} -setup { +test entry-3.51 {EntryWidgetCmd procedure, "selection present" widget command} -setup { entry .e } -body { .e selection present foo } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection present"} -test entry-3.55 {EntryWidgetCmd procedure, "selection present" widget command} -setup { +test entry-3.52 {EntryWidgetCmd procedure, "selection present" widget command} -setup { entry .e pack .e update @@ -1191,7 +1191,7 @@ test entry-3.55 {EntryWidgetCmd procedure, "selection present" widget command} - } -cleanup { destroy .e } -result {1} -test entry-3.56 {EntryWidgetCmd procedure, "selection present" widget command} -setup { +test entry-3.53 {EntryWidgetCmd procedure, "selection present" widget command} -setup { entry .e pack .e update @@ -1204,7 +1204,7 @@ test entry-3.56 {EntryWidgetCmd procedure, "selection present" widget command} - } -cleanup { destroy .e } -result {1} -test entry-3.57 {EntryWidgetCmd procedure, "selection present" widget command} -setup { +test entry-3.54 {EntryWidgetCmd procedure, "selection present" widget command} -setup { entry .e pack .e update @@ -1217,21 +1217,21 @@ test entry-3.57 {EntryWidgetCmd procedure, "selection present" widget command} - } -cleanup { destroy .e } -result {0} -test entry-3.58 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { +test entry-3.55 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { entry .e } -body { .e select adjust x } -cleanup { destroy .e } -returnCodes error -result {bad entry index "x"} -test entry-3.59 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { +test entry-3.56 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { entry .e } -body { .e select adjust 2 3 } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection adjust index"} -test entry-3.60 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { +test entry-3.57 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { entry .e pack .e update @@ -1245,7 +1245,7 @@ test entry-3.60 {EntryWidgetCmd procedure, "selection adjust" widget command} -s } -cleanup { destroy .e } -result {123} -test entry-3.61 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { +test entry-3.58 {EntryWidgetCmd procedure, "selection adjust" widget command} -setup { entry .e pack .e update @@ -1259,7 +1259,7 @@ test entry-3.61 {EntryWidgetCmd procedure, "selection adjust" widget command} -s } -cleanup { destroy .e } -result {234} -test entry-3.62 {EntryWidgetCmd procedure, "selection from" widget command} -setup { +test entry-3.59 {EntryWidgetCmd procedure, "selection from" widget command} -setup { entry .e } -body { .e select from 2 3 @@ -1267,21 +1267,21 @@ test entry-3.62 {EntryWidgetCmd procedure, "selection from" widget command} -set destroy .e } -returnCodes error -result {wrong # args: should be ".e selection from index"} -test entry-3.63 {EntryWidgetCmd procedure, "selection range" widget command} -setup { +test entry-3.60 {EntryWidgetCmd procedure, "selection range" widget command} -setup { entry .e } -body { .e select range 2 } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection range start end"} -test entry-3.64 {EntryWidgetCmd procedure, "selection range" widget command} -setup { +test entry-3.61 {EntryWidgetCmd procedure, "selection range" widget command} -setup { entry .e } -body { .e selection range 2 3 4 } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e selection range start end"} -test entry-3.65 {EntryWidgetCmd procedure, "selection range" widget command} -setup { +test entry-3.62 {EntryWidgetCmd procedure, "selection range" widget command} -setup { entry .e } -body { .e insert end 0123456789 @@ -1292,7 +1292,7 @@ test entry-3.65 {EntryWidgetCmd procedure, "selection range" widget command} -se } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} -test entry-3.66 {EntryWidgetCmd procedure, "selection range" widget command} -setup { +test entry-3.63 {EntryWidgetCmd procedure, "selection range" widget command} -setup { entry .e pack .e update @@ -1305,7 +1305,7 @@ test entry-3.66 {EntryWidgetCmd procedure, "selection range" widget command} -se } -cleanup { destroy .e } -result {2 9 3} -test entry-3.67 {EntryWidgetCmd procedure, "selection" widget command} -setup { +test entry-3.64 {EntryWidgetCmd procedure, "selection" widget command} -setup { entry .e pack .e update @@ -1319,7 +1319,7 @@ test entry-3.67 {EntryWidgetCmd procedure, "selection" widget command} -setup { } -cleanup { destroy .e } -result {0 10} -test entry-3.68 {EntryWidgetCmd procedure, "selection" widget command} -setup { +test entry-3.64a {EntryWidgetCmd procedure, "selection" widget command} -setup { entry .e pack .e update @@ -1333,7 +1333,7 @@ test entry-3.68 {EntryWidgetCmd procedure, "selection" widget command} -setup { } -cleanup { destroy .e } -result {2 4} -test entry-3.69 {EntryWidgetCmd procedure, "selection to" widget command} -setup { +test entry-3.64b {EntryWidgetCmd procedure, "selection to" widget command} -setup { entry .e pack .e update @@ -1345,7 +1345,7 @@ test entry-3.69 {EntryWidgetCmd procedure, "selection to" widget command} -setup destroy .e } -returnCodes error -result {wrong # args: should be ".e selection to index"} -test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.65 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1357,7 +1357,7 @@ test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0.0537634 0.2688172} -test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.66 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1366,7 +1366,7 @@ test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {bad entry index "gorp"} -test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.67 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1380,7 +1380,7 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0.107527 0.322581} -test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.68 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1389,7 +1389,7 @@ test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e xview moveto fraction"} -test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.69 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1398,7 +1398,7 @@ test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {expected floating-point number but got "foo"} -test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.70 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1410,7 +1410,7 @@ test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0.505376 0.720430} -test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.71 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1421,7 +1421,7 @@ test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {wrong # args: should be ".e xview scroll number units|pages"} -test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1432,7 +1432,7 @@ test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {expected integer but got "gorp"} -test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1445,7 +1445,7 @@ test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0.193548 0.408602} -test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.74 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1459,7 +1459,7 @@ test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0.397849 0.612903} -test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.75 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1473,7 +1473,7 @@ test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {32} -test entry-3.81 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.76 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1487,7 +1487,7 @@ test entry-3.81 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {29} -test entry-3.82 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.77 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1498,7 +1498,7 @@ test entry-3.82 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {bad argument "foobars": must be units or pages} -test entry-3.83 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.78 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1509,7 +1509,7 @@ test entry-3.83 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -returnCodes error -result {unknown option "eat": must be moveto or scroll} -test entry-3.84 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.79 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1523,7 +1523,7 @@ test entry-3.84 {EntryWidgetCmd procedure, "xview" widget command} -setup { } -cleanup { destroy .e } -result {0} -test entry-3.85 {EntryWidgetCmd procedure, "xview" widget command} -setup { +test entry-3.80 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1557,7 +1557,7 @@ test entry-3.86 {EntryWidgetCmd procedure, "xview" widget command} -setup { destroy .e } -result {0.095745 0.106383 0.117021} -test entry-3.87 {EntryWidgetCmd procedure} -setup { +test entry-3.82 {EntryWidgetCmd procedure} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e update @@ -1653,7 +1653,7 @@ test entry-5.6 {ConfigureEntry procedure} -setup { } -cleanup { destroy .e } -returnCodes error -result {PRIMARY selection doesn't exist or form "STRING" not defined} -test entry-5.7 {ConfigureEntry procedure} -setup { +test entry-5.6.1 {ConfigureEntry procedure} -setup { entry .e pack .e } -body { @@ -1667,7 +1667,7 @@ test entry-5.7 {ConfigureEntry procedure} -setup { destroy .e } -result {1 5} -test entry-5.8 {ConfigureEntry procedure} -setup { +test entry-5.7 {ConfigureEntry procedure} -setup { entry .e -font {Helvetica -12} -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -1675,13 +1675,13 @@ test entry-5.8 {ConfigureEntry procedure} -setup { .e insert end "01234567890" update .e configure -width 5 - return [format {%.6f %.6f} {*}$scrollInfo] + format {%.6f %.6f} {*}$scrollInfo } -cleanup { destroy .e } -result {0.000000 0.363636} -test entry-5.9 {ConfigureEntry procedure} -constraints { +test entry-5.8 {ConfigureEntry procedure} -constraints { fonts } -setup { entry .e -borderwidth 2 -highlightthickness 2 @@ -1696,7 +1696,7 @@ test entry-5.9 {ConfigureEntry procedure} -constraints { } -cleanup { destroy .e } -result {62x37+0+0} -test entry-5.10 {ConfigureEntry procedure} -constraints { +test entry-5.9 {ConfigureEntry procedure} -constraints { fonts } -setup { entry .e -borderwidth 2 -highlightthickness 2 @@ -1709,7 +1709,7 @@ test entry-5.10 {ConfigureEntry procedure} -constraints { } -cleanup { destroy .e } -result {0 0 1 1} -test entry-5.11 {ConfigureEntry procedure} -constraints { +test entry-5.10 {ConfigureEntry procedure} -constraints { fonts } -setup { entry .e -borderwidth 2 -highlightthickness 2 @@ -1722,7 +1722,7 @@ test entry-5.11 {ConfigureEntry procedure} -constraints { } -cleanup { destroy .e } -result {0 0 1 1} -test entry-5.12 {ConfigureEntry procedure} -setup { +test entry-5.11 {ConfigureEntry procedure} -setup { entry .e -borderwidth 2 -highlightthickness 2 pack .e } -body { @@ -2554,6 +2554,11 @@ test entry-13.9 {GetEntryIndex procedure} -setup { destroy .e } -result {1 6} + + + + + test entry-13.10 {GetEntryIndex procedure} -constraints unix -body { # On unix, when selection is cleared, entry widget's internal # selection range is reset. @@ -2572,7 +2577,29 @@ test entry-13.10 {GetEntryIndex procedure} -constraints unix -body { } -cleanup { destroy .e } -returnCodes error -result {selection isn't in widget .e} -test entry-13.11 {GetEntryIndex procedure} -constraints unix -body { + +test entry-13.11 {GetEntryIndex procedure} -constraints win -body { +# On mac and pc, when selection is cleared, entry widget remembers +# last selected range. When selection ownership is restored to +# entry, the old range will be rehighlighted. +# Previous settings: + entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken + pack .e + .e insert 0 012345678901234567890 + .e xview 4 + update + .e select from 1 + .e select to 6 + list [.e index sel.first] [.e index sel.last] +# Testing: + selection clear .e + catch {selection get} + .e index sel.first +} -cleanup { + destroy .e +} -result {1} + +test entry-13.12 {GetEntryIndex procedure} -constraints unix -body { # Previous settings: entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken pack .e @@ -2591,7 +2618,7 @@ test entry-13.11 {GetEntryIndex procedure} -constraints unix -body { # why when string in .e index changed to not beginning with s, # it behaves differently? -test entry-13.12 {GetEntryIndex procedure} -constraints unix -body { +test entry-13.12.1 {GetEntryIndex procedure} -constraints unix -body { # Previous settings: entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken pack .e @@ -2609,9 +2636,6 @@ test entry-13.12 {GetEntryIndex procedure} -constraints unix -body { } -returnCodes error -result {bad entry index "bogus"} test entry-13.13 {GetEntryIndex procedure} -constraints win -body { -# On mac and pc, when selection is cleared, entry widget remembers -# last selected range. When selection ownership is restored to -# entry, the old range will be rehighlighted. # Previous settings: entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken pack .e @@ -2623,10 +2647,11 @@ test entry-13.13 {GetEntryIndex procedure} -constraints win -body { list [.e index sel.first] [.e index sel.last] # Testing: selection clear .e - selection get + .e index sbogus } -cleanup { destroy .e -} -returnCodes error -match glob -result {*} +} -returnCodes error -result {bad entry index "sbogus"} + test entry-13.14 {GetEntryIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, entry widget remembers # last selected range. When selection ownership is restored to @@ -2642,12 +2667,12 @@ test entry-13.14 {GetEntryIndex procedure} -constraints win -body { list [.e index sel.first] [.e index sel.last] # Testing: selection clear .e - catch {selection get} - .e index sel.first + selection get } -cleanup { destroy .e -} -result {1} -test entry-13.15 {GetEntryIndex procedure} -constraints win -body { +} -returnCodes error -match glob -result {*} + +test entry-13.14.1 {GetEntryIndex procedure} -constraints win -body { # On mac and pc, when selection is cleared, entry widget remembers # last selected range. When selection ownership is restored to # entry, the old range will be rehighlighted. @@ -2667,24 +2692,8 @@ test entry-13.15 {GetEntryIndex procedure} -constraints win -body { } -cleanup { destroy .e } -returnCodes error -match glob -result {*} -test entry-13.16 {GetEntryIndex procedure} -constraints win -body { -# Previous settings: - entry .e -font {Courier -12} -width 5 -bd 2 -relief sunken - pack .e - .e insert 0 012345678901234567890 - .e xview 4 - update - .e select from 1 - .e select to 6 - list [.e index sel.first] [.e index sel.last] -# Testing: - selection clear .e - .e index sbogus -} -cleanup { - destroy .e -} -returnCodes error -result {bad entry index "sbogus"} -test entry-13.17 {GetEntryIndex procedure} -body { +test entry-13.15 {GetEntryIndex procedure} -body { entry .e selection clear .e .e index @xyz @@ -2692,7 +2701,7 @@ test entry-13.17 {GetEntryIndex procedure} -body { destroy .e } -returnCodes error -result {bad entry index "@xyz"} -test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.16 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2703,7 +2712,7 @@ test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { } -cleanup { destroy .e } -result {4} -test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.17 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2714,7 +2723,7 @@ test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body { } -cleanup { destroy .e } -result {4} -test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.18 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2725,7 +2734,7 @@ test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { } -cleanup { destroy .e } -result {5} -test entry-13.21 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.19 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2736,7 +2745,7 @@ test entry-13.21 {GetEntryIndex procedure} -constraints fonts -body { } -cleanup { destroy .e } -result {8} -test entry-13.22 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.20 {GetEntryIndex procedure} -constraints fonts -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2747,7 +2756,7 @@ test entry-13.22 {GetEntryIndex procedure} -constraints fonts -body { } -cleanup { destroy .e } -result {9} -test entry-13.23 {GetEntryIndex procedure} -body { +test entry-13.21 {GetEntryIndex procedure} -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2758,7 +2767,7 @@ test entry-13.23 {GetEntryIndex procedure} -body { } -cleanup { destroy .e } -result {9} -test entry-13.24 {GetEntryIndex procedure} -setup { +test entry-13.22 {GetEntryIndex procedure} -setup { entry .e pack .e update @@ -2767,7 +2776,7 @@ test entry-13.24 {GetEntryIndex procedure} -setup { } -cleanup { destroy .e } -returnCodes error -result {bad entry index "1xyz"} -test entry-13.25 {GetEntryIndex procedure} -body { +test entry-13.23 {GetEntryIndex procedure} -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2778,7 +2787,7 @@ test entry-13.25 {GetEntryIndex procedure} -body { } -cleanup { destroy .e } -result {0} -test entry-13.26 {GetEntryIndex procedure} -body { +test entry-13.24 {GetEntryIndex procedure} -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2789,7 +2798,7 @@ test entry-13.26 {GetEntryIndex procedure} -body { } -cleanup { destroy .e } -result {12} -test entry-13.27 {GetEntryIndex procedure} -body { +test entry-13.25 {GetEntryIndex procedure} -body { entry .e -width 5 -relief sunken -highlightthickness 2 -bd 2\ -font {Courier -12} pack .e @@ -2800,7 +2809,7 @@ test entry-13.27 {GetEntryIndex procedure} -body { } -cleanup { destroy .e } -result {21} -test entry-13.28 {GetEntryIndex procedure} -constraints fonts -body { +test entry-13.26 {GetEntryIndex procedure} -constraints fonts -body { entry .e -highlightthickness 2 -bd 2 -font {Helvetica -12} selection clear .e .e configure -show . @@ -2868,10 +2877,10 @@ test entry-16.1 {EntryVisibleRange procedure} -constraints fonts -body { pack .e update .e insert 0 "............................." - .e xview + format {%.6f %.6f} {*}[.e xview] } -cleanup { destroy .e -} -result {0 0.827586} +} -result {0.000000 0.827586} test entry-16.2 {EntryVisibleRange procedure} -constraints { unix fonts } -body { @@ -2908,7 +2917,7 @@ test entry-17.1 {EntryUpdateScrollbar procedure} -body { .e delete 0 end .e insert 0 123 update - return [format {%.6f %.6f} {*}$scrollInfo] + format {%.6f %.6f} {*}$scrollInfo } -cleanup { destroy .e } -result {0.000000 1.000000} @@ -2918,7 +2927,7 @@ test entry-17.2 {EntryUpdateScrollbar procedure} -body { .e insert 0 0123456789abcdef .e xview 3 update - return [format {%.6f %.6f} {*}$scrollInfo] + format {%.6f %.6f} {*}$scrollInfo } -cleanup { destroy .e } -result {0.187500 0.812500} @@ -2928,7 +2937,7 @@ test entry-17.3 {EntryUpdateScrollbar procedure} -body { .e insert 0 abcdefghijklmnopqrs .e xview 6 update - return [format {%.6f %.6f} {*}$scrollInfo] + format {%.6f %.6f} {*}$scrollInfo } -cleanup { destroy .e } -result {0.315789 0.842105} |