diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-22 15:02:23 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2019-08-22 15:02:23 (GMT) |
commit | 127c180c66bf291cae359b4c83fcfce3961af8be (patch) | |
tree | 75c30064dcd65da3c0b1a72f00f0985cee83c720 /tests | |
parent | e1486d48b18bdd738d42c22f61f597b17ea02fc4 (diff) | |
download | tk-127c180c66bf291cae359b4c83fcfce3961af8be.zip tk-127c180c66bf291cae359b4c83fcfce3961af8be.tar.gz tk-127c180c66bf291cae359b4c83fcfce3961af8be.tar.bz2 |
Allow using floating-point number in "scroll (x|y)view (units|pages)". They are rounded away from zero towards an integer.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/entry.test | 2 | ||||
-rw-r--r-- | tests/spinbox.test | 2 | ||||
-rw-r--r-- | tests/textDisp.test | 8 | ||||
-rw-r--r-- | tests/util.test | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/tests/entry.test b/tests/entry.test index 6207c69..47b459d 100644 --- a/tests/entry.test +++ b/tests/entry.test @@ -1446,7 +1446,7 @@ test entry-3.72 {EntryWidgetCmd procedure, "xview" widget command} -setup { .e xview scroll gorp units } -cleanup { destroy .e -} -returnCodes error -result {expected integer but got "gorp"} +} -returnCodes error -result {expected floating-point number but got "gorp"} test entry-3.73 {EntryWidgetCmd procedure, "xview" widget command} -setup { entry .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e diff --git a/tests/spinbox.test b/tests/spinbox.test index efd5b63..65c5bd9 100644 --- a/tests/spinbox.test +++ b/tests/spinbox.test @@ -1784,7 +1784,7 @@ test spinbox-3.72 {SpinboxWidgetCmd procedure, "xview" widget command} -setup { .e xview scroll gorp units } -cleanup { destroy .e -} -returnCodes error -result {expected integer but got "gorp"} +} -returnCodes error -result {expected floating-point number but got "gorp"} test spinbox-3.73 {SpinboxWidgetCmd procedure, "xview" widget command} -setup { spinbox .e -font {Courier -12} -borderwidth 2 -highlightthickness 2 pack .e diff --git a/tests/textDisp.test b/tests/textDisp.test index 1b6f4c5..c029a69 100644 --- a/tests/textDisp.test +++ b/tests/textDisp.test @@ -1873,7 +1873,7 @@ test textDisp-14.11 {TkTextXviewCmd procedure} { } {1 {wrong # args: should be ".t xview scroll number pages|pixels|units"}} test textDisp-14.12 {TkTextXviewCmd procedure} { list [catch {.t xview scroll gorp units} msg] $msg -} {1 {expected integer but got "gorp"}} +} {1 {expected floating-point number but got "gorp"}} test textDisp-14.13 {TkTextXviewCmd procedure} { .t delete 1.0 end .t insert end xxxxxxxxx\n @@ -2091,11 +2091,11 @@ test textDisp-16.20 {TkTextYviewCmd procedure, "scroll" option} { list [catch {.t yview scroll a b c} msg] $msg } {1 {wrong # args: should be ".t yview scroll number pages|pixels|units"}} test textDisp-16.21 {TkTextYviewCmd procedure, "scroll" option} { - list [catch {.t yview scroll badInt bogus} msg] $msg + list [catch {.t yview scroll bogus bogus} msg] $msg } {1 {bad argument "bogus": must be pages, pixels, or units}} test textDisp-16.21.2 {TkTextYviewCmd procedure, "scroll" option} { - list [catch {.t yview scroll badInt units} msg] $msg -} {1 {expected integer but got "badInt"}} + list [catch {.t yview scroll bogus units} msg] $msg +} {1 {expected floating-point number but got "bogus"}} test textDisp-16.22 {TkTextYviewCmd procedure, "scroll" option, back pages} { .t yview 50.0 update diff --git a/tests/util.test b/tests/util.test index d457b50..c2f4542 100644 --- a/tests/util.test +++ b/tests/util.test @@ -34,7 +34,7 @@ test util-1.5 {Tk_GetScrollInfo procedure} -body { } -returnCodes error -result {wrong # args: should be ".l yview scroll number pages|units"} test util-1.6 {Tk_GetScrollInfo procedure} -body { .l yview scroll xyz units -} -returnCodes error -result {expected integer but got "xyz"} +} -returnCodes error -result {expected floating-point number but got "xyz"} test util-1.7 {Tk_GetScrollInfo procedure} -body { .l yview 0 .l yview scroll 2 pages |