📄 disjointlistbox.test
字号:
# This file is a Tcl script to test out [incr Widgets] Disjointlistbox class.# It is organized in the standard fashion for Tcl tests with the following# notation for test case labels:## 1.x - Construction/Destruction tests# 2.x - Configuration option tests# 3.x - Method tests## Copyright (c) 1995 DSC Technologies Corporation## See the file "license.terms" for information on usage and redistribution# of this file, and for a DISCLAIMER OF ALL WARRANTIES.## @(#) $Id: disjointlistbox.test,v 1.1 2003/02/05 10:54:13 mdejong Exp $package require tcltestnamespace import -force ::tcltest::*package require Iwidgets 3.0if {[string compare test [info procs test]] == 1} { source defs}wm geometry . {}raise .set c 1set o 1set m 1## Initial construction test#test Disjointlistbox-1.$c {Disjointlistbox construction} { iwidgets::Disjointlistbox .lf pack .lf -fill both -expand yes update } {}incr c## Option tests which are successful.#test Disjointlistbox-2.$o {configuration option} { llength [.lf configure]} {28}incr oforeach test { {-lhslabeltext "LHS" "LHS"} {-lhslabeltext "Available" "Available"} {-lhslabeltext "Don't Print" "Don't Print"} {-rhslabeltext "RHS" "RHS"} {-rhslabeltext "Current" "Current"} {-rhslabeltext "Print" "Print"} {-buttonplacement bottom bottom} {-buttonplacement center center} } { set option [lindex $test 0] test Disjointlistbox-1.$o "configuration options, $option" { .lf configure $option [lindex $test 1] lindex [.lf configure $option] 4 } [lindex $test 2] update incr o }## Method tests which are successful.#test Disjointlistbox-1.$c {Disjointlistbox destruction} { destroy .lf update } {}incr ctest Disjointlistbox-1.$c {Disjointlistbox construction} { iwidgets::disjointlistbox .lf -lhslabeltext "Don't Print" -rhslabeltext "Print" pack .lf -fill both -expand yes update } {}incr ctest Disjointlistbox-1.$c {Disjointlistbox destruction} { destroy .lf update } {}incr ctest Disjointlistbox-1.$c {Disjointlistbox construction} { iwidgets::disjointlistbox .lf pack .lf destroy .lf update } {}::tcltest::cleanupTestsexit
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -