From 11e3592a11d54f1f9be294b842a526a9c3c6ef67 Mon Sep 17 00:00:00 2001 From: fvogel Date: Mon, 13 Mar 2017 13:33:38 +0000 Subject: =?UTF-8?q?Add=20test=20progressbar-3.2=20(tweaked=20from=20a=20pr?= =?UTF-8?q?oposal=20from=20Ren=C3=A9=20Zaumseil)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/ttk/progressbar.test | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tests/ttk/progressbar.test b/tests/ttk/progressbar.test index bd53f2e..7c888c6 100644 --- a/tests/ttk/progressbar.test +++ b/tests/ttk/progressbar.test @@ -97,4 +97,28 @@ test progressbar-3.1 "progressbar non-core options" -setup { destroy .defaultpb } -result {w black left {} {} 0 100 100 determinate horizontal 0 0.0 {}} +test progressbar-3.2 "TIP #442 options are taken into account" -setup { + set res {} + pack [ttk::progressbar .p -value 0 -maximum 50 -orient horizontal -mode determinate -length 500] + set thefont [font actual {Arial 10}] +} -body { + .p configure -anchor c -foreground blue -justify right \ + -text "TIP #442\noptions are now tested" -wraplength 100 + update + .p step 10 + .p configure -anchor e -font $thefont -foreground green -justify center \ + -text "Changing the value of each option\nfrom TIP #442" -wraplength 250 + update + .p step 20 + .p configure -orient vertical -text "Cannot be seen" + update + foreach option {-anchor -foreground -justify -text -wraplength} { + lappend res [list $option [.p cget $option]] + } + set res +} -cleanup { + unset res thefont + destroy .p +} -result {{-anchor e} {-foreground green} {-justify center} {-text {Cannot be seen}} {-wraplength 250}} + tcltest::cleanupTests -- cgit v0.12