From 972c1858b2265633c051f38792c0761763f5a870 Mon Sep 17 00:00:00 2001 From: patthoyts Date: Sun, 23 Nov 2008 21:40:43 +0000 Subject: Fixed some locale dependencies to reduce the noise on non-English systems --- ChangeLog | 5 + tests/bind.test | 1308 ++++++++++++++++++++++++++++--------------------------- 2 files changed, 662 insertions(+), 651 deletions(-) diff --git a/ChangeLog b/ChangeLog index 975827a..678d7b5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-11-23 Pat Thoyts + + * tests/bind.test: Fixed some locale dependencies in various + tests to reduce the noise on non-English windows systems. + 2008-11-22 Donal K. Fellows * library/demos/ctext.tcl: Extended to show off what you can do with diff --git a/tests/bind.test b/tests/bind.test index 7054289..d568026 100644 --- a/tests/bind.test +++ b/tests/bind.test @@ -7,7 +7,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: bind.test,v 1.24 2008/11/23 00:47:25 ferrieux Exp $ +# RCS: @(#) $Id: bind.test,v 1.25 2008/11/23 21:40:43 patthoyts Exp $ package require tcltest 2.2 namespace import ::tcltest::* @@ -195,7 +195,7 @@ test bind-4.1 {TkBindEventProc procedure} -setup { bind .t {lappend x "%W enter .t"} bind .t.f {lappend x "%W enter .t.f"} - event gen .t.f + event generate .t.f return $x } -cleanup { destroy .t.f @@ -216,7 +216,7 @@ test bind-4.2 {TkBindEventProc procedure} -setup { bind .t.f {lappend x "%W enter .t.f"} bindtags .t.f {.t.f {a b} xyz} - event gen .t.f + event generate .t.f return $x } -cleanup { destroy .t.f @@ -231,7 +231,7 @@ test bind-4.3 {TkBindEventProc procedure} -body { bind {a b} {lappend x "%W enter {a b}"} bind .t {lappend x "%W enter .t"} - event gen .t + event generate .t return $x } -cleanup { unsetBindings @@ -254,7 +254,7 @@ test bind-4.4 {TkBindEventProc procedure} -setup { bindtags .t.f {.t.f .t.f2 .t.f3} bind .t.f {lappend x "%W enter .t.f"} bind .t.f3 {lappend x "%W enter .t.f3"} - event gen .t.f + event generate .t.f return $x } -cleanup { destroy .t.f .t.f3 @@ -275,7 +275,7 @@ test bind-4.5 {TkBindEventProc procedure} -setup { bind .t {lappend x "%W enter .t"} bindtags .t.f {a b c d e f g h i j k l m n o p q r s t u v w x y z} - event gen .t.f + event generate .t.f } -cleanup { destroy .t.f unsetBindings @@ -318,7 +318,7 @@ test bind-6.2 {Tk_DeleteBindTable procedure: pending bindings deleted later} -co bind b <1> "lappend x b1" testcbind c <1> "lappend x c1" "lappend x bye.c1" testcbind c <2> "lappend x all2" "lappend x bye.all2" - event gen .g <1> + event generate .g <1> } set x [foo eval set x] return $x @@ -377,7 +377,7 @@ test bind-8.2 {TkCreateBindingProcedure: new binding} -constraints { set x {} } -body { testcbind .t.f <1> "lappend x 1" "lappend x bye.1" - event gen .t.f <1> + event generate .t.f <1> destroy .t.f return $x } -result {bye.1} @@ -404,7 +404,7 @@ test bind-8.4 {TkCreateBindingProcedure: replace existing while pending} -constr } -body { testcbind .t.f <1> "lappend x .t.f; testcbind Frame <1> {lappend x Frame}" testcbind Frame <1> "lappend x never" - event gen .t.f <1> + event generate .t.f <1> bind .t.f <1> {} return $x } -cleanup { @@ -461,7 +461,7 @@ test bind-9.4 {Tk_DeleteBinding procedure: pending bindings delete later} -const bind b <1> {lappend x b1} testcbind c <1> {lappend x c1} {lappend x bye.c1} testcbind c <2> {lappend x c2} {lappend x bye.c2} - event gen .t.f <1> + event generate .t.f <1> bind a <1> {} bind b <1> {} return $x @@ -543,11 +543,11 @@ test bind-12.3 {Tk_DeleteAllBindings procedure: pending bindings deleted later} update set x {} } -body { - testcbind .t.f <1> {lappend x before; event gen .t.f <2>; lappend x after} {lappend x bye.f1} + testcbind .t.f <1> {lappend x before; event generate .t.f <2>; lappend x after} {lappend x bye.f1} testcbind .t.f <2> {destroy .t.f} {lappend x bye.f2} bind .t.f {lappend x fDestroy} testcbind .t.f <3> {foo} {lappend x bye.f3} - event gen .t.f <1> + event generate .t.f <1> return $x } -cleanup { destroy .t.f @@ -560,23 +560,23 @@ test bind-13.1 {Tk_BindEvent procedure} -setup { update set x {} } -body { - bind Test {lappend x "%W %K Test press any"} - bind all {lappend x "%W %K all press any"} - bind Test a {lappend x "%W %K Test press a"} - bind all x {lappend x "%W %K all press x"} - bind .t.f a {lappend x "%W %K .t.f press a"} + bind Test {lappend x "%W %K Test KeyPress"} + bind all {lappend x "%W %K all KeyPress"} + bind Test : {lappend x "%W %K Test :"} + bind all _ {lappend x "%W %K all _"} + bind .t.f : {lappend x "%W %K .t.f :"} - event gen .t.f - event gen .t.f - event gen .t.f + event generate .t.f + event generate .t.f + event generate .t.f return $x } -cleanup { destroy .t.f bind all {} bind Test {} - bind all x {} - bind Test a {} -} -result {{.t.f a .t.f press a} {.t.f a Test press a} {.t.f a all press any} {.t.f b Test press any} {.t.f b all press any} {.t.f x Test press any} {.t.f x all press x}} + bind all _ {} + bind Test : {} +} -result {{.t.f colon .t.f :} {.t.f colon Test :} {.t.f colon all KeyPress} {.t.f plus Test KeyPress} {.t.f plus all KeyPress} {.t.f underscore Test KeyPress} {.t.f underscore all _}} test bind-13.2 {Tk_BindEvent procedure} -setup { frame .t.f -class Test -width 150 -height 100 @@ -587,15 +587,15 @@ test bind-13.2 {Tk_BindEvent procedure} -setup { } -body { bind Test {lappend x "%W %K Test press any"; break} bind all {continue; lappend x "%W %K all press any"} - bind .t.f b {lappend x "%W %K .t.f press a"} + bind .t.f : {lappend x "%W %K .t.f pressed colon"} - event gen .t.f + event generate .t.f return $x } -cleanup { destroy .t.f bind all {} bind Test {} -} -result {{.t.f b .t.f press a} {.t.f b Test press any}} +} -result {{.t.f colon .t.f pressed colon} {.t.f colon Test press any}} test bind-13.3 {Tk_BindEvent procedure} -setup { proc bgerror args {} @@ -606,22 +606,22 @@ test bind-13.3 {Tk_BindEvent procedure} -setup { set x {} } -body { bind Test {lappend x "%W %K Test press any"; error Test} - bind .t.f b {lappend x "%W %K .t.f press a"} - event gen .t.f + bind .t.f : {lappend x "%W %K .t.f pressed colon"} + event generate .t.f update list $x $errorInfo } -cleanup { destroy .t.f bind Test {} rename bgerror {} -} -result {{{.t.f b .t.f press a} {.t.f b Test press any}} {Test +} -result {{{.t.f colon .t.f pressed colon} {.t.f colon Test press any}} {Test while executing "error Test" (command bound to event)}} test bind-13.4 {Tk_BindEvent procedure} -setup { proc foo {} { set x 44 - event gen .t.f + event generate .t.f } frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -629,14 +629,14 @@ test bind-13.4 {Tk_BindEvent procedure} -setup { update set x {} } -body { - bind Test a {lappend x "%W %K Test press a"} - bind .t.f a {lappend x "%W %K .t.f press a"} + bind Test : {lappend x "%W %K Test"} + bind .t.f : {lappend x "%W %K .t.f"} foo return $x } -cleanup { destroy .t.f - bind Test a {} -} -result {{.t.f a .t.f press a} {.t.f a Test press a}} + bind Test : {} +} -result {{.t.f colon .t.f} {.t.f colon Test}} test bind-13.5 {Tk_BindEvent procedure} -body { bind all {lappend x "%W destroyed"} @@ -661,16 +661,16 @@ test bind-13.7 {Tk_BindEvent procedure} -setup { update set x {} } -body { - bind .t.f z {lappend x "%W z (.t.f binding)"} - bind Test z {lappend x "%W z (.t.f binding)"} - bind all z {bind .t.f z {}; lappend x "%W z (.t.f binding)"} - event gen .t.f + bind .t.f : {lappend x "%W (.t.f binding)"} + bind Test : {lappend x "%W (Test binding)"} + bind all : {bind .t.f : {}; lappend x "%W (all binding)"} + event generate .t.f return $x } -cleanup { - bind Test z {} - bind all z {} + bind Test : {} + bind all : {} destroy .t.f -} -result {{.t.f z (.t.f binding)} {.t.f z (.t.f binding)} {.t.f z (.t.f binding)}} +} -result {{.t.f (.t.f binding)} {.t.f (Test binding)} {.t.f (all binding)}} test bind-13.8 {Tk_BindEvent procedure} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -678,16 +678,16 @@ test bind-13.8 {Tk_BindEvent procedure} -setup { update set x {} } -body { - bind .t.f z {lappend x "%W z (.t.f binding)"} - bind Test z {lappend x "%W z (.t.f binding)"} - bind all z {destroy .t.f; lappend x "%W z (.t.f binding)"} - event gen .t.f + bind .t.f : {lappend x "%W (.t.f binding)"} + bind Test : {lappend x "%W (Test binding)"} + bind all : {destroy .t.f; lappend x "%W (all binding)"} + event generate .t.f return $x } -cleanup { - bind Test z {} - bind all z {} + bind Test : {} + bind all : {} destroy .t.f -} -result {{.t.f z (.t.f binding)} {.t.f z (.t.f binding)} {.t.f z (.t.f binding)}} +} -result {{.t.f (.t.f binding)} {.t.f (Test binding)} {.t.f (all binding)}} test bind-13.9 {Tk_BindEvent procedure} -setup { frame .t.f -class Test -width 150 -height 100 @@ -698,8 +698,8 @@ test bind-13.9 {Tk_BindEvent procedure} -setup { } -body { bind .t.f <1> {lappend x "%W z (.t.f <1> binding)"} bind .t.f {lappend x "%W z (.t.f binding)"} - event gen .t.f - event gen .t.f + event generate .t.f + event generate .t.f return $x } -cleanup { destroy .t.f @@ -713,10 +713,10 @@ test bind-13.10 {Tk_BindEvent procedure: ignore NotifyInferior} -setup { } -body { bind .t.f "lappend x Enter%#" bind .t.f "lappend x Leave%#" - event gen .t.f -serial 100 -detail NotifyAncestor - event gen .t.f -serial 101 -detail NotifyInferior - event gen .t.f -serial 102 -detail NotifyAncestor - event gen .t.f -serial 103 -detail NotifyInferior + event generate .t.f -serial 100 -detail NotifyAncestor + event generate .t.f -serial 101 -detail NotifyInferior + event generate .t.f -serial 102 -detail NotifyAncestor + event generate .t.f -serial 103 -detail NotifyInferior return $x } -cleanup { destroy .t.f @@ -729,10 +729,10 @@ test bind-13.11 {Tk_BindEvent procedure: collapse Motions} -setup { set x {} } -body { bind .t.f "lappend x Motion%#(%x,%y)" - event gen .t.f -serial 100 -x 100 -y 200 -when tail + event generate .t.f -serial 100 -x 100 -y 200 -when tail update - event gen .t.f -serial 101 -x 200 -y 300 -when tail - event gen .t.f -serial 102 -x 300 -y 400 -when tail + event generate .t.f -serial 101 -x 200 -y 300 -when tail + event generate .t.f -serial 102 -x 300 -y 400 -when tail update return $x } -cleanup { @@ -746,10 +746,10 @@ test bind-13.12 {Tk_BindEvent procedure: collapse repeating modifiers} -setup { } -body { bind .t.f "lappend x %K%#" bind .t.f "lappend x %K%#" - event gen .t.f -serial 100 -when tail - event gen .t.f -serial 101 -when tail - event gen .t.f -serial 102 -when tail - event gen .t.f -serial 103 -when tail + event generate .t.f -serial 100 -when tail + event generate .t.f -serial 101 -when tail + event generate .t.f -serial 102 -when tail + event generate .t.f -serial 103 -when tail update } -cleanup { destroy .t.f @@ -763,12 +763,12 @@ test bind-13.13 {Tk_BindEvent procedure: valid key detail} -setup { } -body { bind .t.f "lappend x Key%K" bind .t.f "lappend x Release%K" - event gen .t.f -keysym a - event gen .t.f -keysym a + event generate .t.f -keysym : + event generate .t.f -keysym : return $x } -cleanup { destroy .t.f -} -result {Keya Releasea} +} -result {Keycolon Releasecolon} test bind-13.14 {Tk_BindEvent procedure: invalid key detail} -setup { frame .t.f -class Test -width 150 -height 100 pack .t.f @@ -778,8 +778,8 @@ test bind-13.14 {Tk_BindEvent procedure: invalid key detail} -setup { } -body { bind .t.f "lappend x Key%K" bind .t.f "lappend x Release%K" - event gen .t.f -keycode 0 - event gen .t.f -keycode 0 + event generate .t.f -keycode 0 + event generate .t.f -keycode 0 return $x } -cleanup { destroy .t.f @@ -793,8 +793,8 @@ test bind-13.15 {Tk_BindEvent procedure: button detail} -setup { } -body { bind .t.f