diff options
author | donal.k.fellows@manchester.ac.uk <dkf> | 2004-06-24 12:45:41 (GMT) |
---|---|---|
committer | donal.k.fellows@manchester.ac.uk <dkf> | 2004-06-24 12:45:41 (GMT) |
commit | 72754477d458ee1a408b36a9517229822e7bcd9d (patch) | |
tree | 247a6f8a357677371ada6b20a07faf589614debb /tests/select.test | |
parent | 49b0e6b4d1beaaa5adc98082199f8438d0703f58 (diff) | |
download | tk-72754477d458ee1a408b36a9517229822e7bcd9d.zip tk-72754477d458ee1a408b36a9517229822e7bcd9d.tar.gz tk-72754477d458ee1a408b36a9517229822e7bcd9d.tar.bz2 |
Use standard constraint names
Diffstat (limited to 'tests/select.test')
-rw-r--r-- | tests/select.test | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/tests/select.test b/tests/select.test index 1195661..10991b7 100644 --- a/tests/select.test +++ b/tests/select.test @@ -6,7 +6,7 @@ # Copyright (c) 1998-1999 by Scriptics Corporation. # All rights reserved. # -# RCS: @(#) $Id: select.test,v 1.14 2004/06/04 19:55:31 dgp Exp $ +# RCS: @(#) $Id: select.test,v 1.15 2004/06/24 12:45:43 dkf Exp $ # # Note: Multiple display selection handling will only be tested if the @@ -129,13 +129,13 @@ test select-1.3 {Tk_CreateSelHandler procedure} { set selInfo "" list [selection get TEST] $selInfo } {{Test value} {TEST 0 4000}} -test select-1.4.1 {Tk_CreateSelHandler procedure} {unixOnly} { +test select-1.4.1 {Tk_CreateSelHandler procedure} unix { setup selection handle .f1 {handler TEST} TEST selection handle .f1 {handler STRING} lsort [selection get TARGETS] } {MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING} -test select-1.4.2 {Tk_CreateSelHandler procedure} {pcOnly} { +test select-1.4.2 {Tk_CreateSelHandler procedure} win { setup selection handle .f1 {handler TEST} TEST selection handle .f1 {handler STRING} @@ -150,7 +150,7 @@ test select-1.5 {Tk_CreateSelHandler procedure} { set selInfo "" list [selection get] $selInfo } {{} {STRING 0 4000}} -test select-1.6.1 {Tk_CreateSelHandler procedure} {unixOnly} { +test select-1.6.1 {Tk_CreateSelHandler procedure} unix { global selValue selInfo setup selection handle .f1 {handler TEST} TEST @@ -163,7 +163,7 @@ test select-1.6.1 {Tk_CreateSelHandler procedure} {unixOnly} { selection get -type TEST list [set selInfo] [lsort [selection get TARGETS]] } {{STRING 0 4000 TEST 0 4000 TEST2 0 4000} {MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING}} -test select-1.6.2 {Tk_CreateSelHandler procedure} {pcOnly} { +test select-1.6.2 {Tk_CreateSelHandler procedure} win { global selValue selInfo setup selection handle .f1 {handler TEST} TEST @@ -176,7 +176,7 @@ test select-1.6.2 {Tk_CreateSelHandler procedure} {pcOnly} { selection get -type TEST list [set selInfo] [lsort [selection get TARGETS]] } {{STRING 0 4000 TEST 0 4000 TEST2 0 4000} {MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-1.7.1 {Tk_CreateSelHandler procedure} {unixOnly} { +test select-1.7.1 {Tk_CreateSelHandler procedure} unix { setup selection own -selection CLIPBOARD .f1 selection handle -selection CLIPBOARD .f1 {handler TEST} TEST @@ -184,7 +184,7 @@ test select-1.7.1 {Tk_CreateSelHandler procedure} {unixOnly} { list [lsort [selection get -selection PRIMARY TARGETS]] \ [lsort [selection get -selection CLIPBOARD TARGETS]] } {{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING} {MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-1.7.2 {Tk_CreateSelHandler procedure} {pcOnly} { +test select-1.7.2 {Tk_CreateSelHandler procedure} win { setup selection own -selection CLIPBOARD .f1 selection handle -selection CLIPBOARD .f1 {handler TEST} TEST @@ -200,7 +200,7 @@ test select-1.8 {Tk_CreateSelHandler procedure} { ############################################################################## -test select-2.1 {Tk_DeleteSelHandler procedure} {unixOnly} { +test select-2.1 {Tk_DeleteSelHandler procedure} unix { setup selection handle .f1 {handler STRING} selection handle -type TEST .f1 {handler TEST} @@ -209,7 +209,7 @@ test select-2.1 {Tk_DeleteSelHandler procedure} {unixOnly} { selection handle -type TEST .f1 {} lappend result [lsort [selection get TARGETS]] } {{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW USER UTF8_STRING} {MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW USER UTF8_STRING}} -test select-2.2 {Tk_DeleteSelHandler procedure} {unixOnly} { +test select-2.2 {Tk_DeleteSelHandler procedure} unix { setup selection handle .f1 {handler STRING} selection handle -type TEST .f1 {handler TEST} @@ -218,7 +218,7 @@ test select-2.2 {Tk_DeleteSelHandler procedure} {unixOnly} { selection handle -type USER .f1 {} lappend result [lsort [selection get TARGETS]] } {{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW USER UTF8_STRING} {MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING}} -test select-2.3 {Tk_DeleteSelHandler procedure} {unixOnly} { +test select-2.3 {Tk_DeleteSelHandler procedure} unix { setup selection own -selection CLIPBOARD .f1 selection handle -selection PRIMARY .f1 {handler STRING} @@ -227,7 +227,7 @@ test select-2.3 {Tk_DeleteSelHandler procedure} {unixOnly} { list [lsort [selection get TARGETS]] \ [lsort [selection get -selection CLIPBOARD TARGETS]] } {{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-2.4 {Tk_DeleteSelHandler procedure} {pcOnly} { +test select-2.4 {Tk_DeleteSelHandler procedure} win { setup selection handle .f1 {handler STRING} selection handle -type TEST .f1 {handler TEST} @@ -236,7 +236,7 @@ test select-2.4 {Tk_DeleteSelHandler procedure} {pcOnly} { selection handle -type TEST .f1 {} lappend result [lsort [selection get TARGETS]] } {{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW USER} {MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW USER}} -test select-2.5 {Tk_DeleteSelHandler procedure} {pcOnly} { +test select-2.5 {Tk_DeleteSelHandler procedure} win { setup selection handle .f1 {handler STRING} selection handle -type TEST .f1 {handler TEST} @@ -245,7 +245,7 @@ test select-2.5 {Tk_DeleteSelHandler procedure} {pcOnly} { selection handle -type USER .f1 {} lappend result [lsort [selection get TARGETS]] } {{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW USER} {MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-2.6 {Tk_DeleteSelHandler procedure} {pcOnly} { +test select-2.6 {Tk_DeleteSelHandler procedure} win { setup selection own -selection CLIPBOARD .f1 selection handle -selection PRIMARY .f1 {handler STRING} @@ -305,7 +305,7 @@ test select-3.6 {Tk_OwnSelection procedure} { selection clear .f1 lappend result $lostSel } {owned lost2} -test select-3.7 {Tk_OwnSelection procedure} {unixOnly} { +test select-3.7 {Tk_OwnSelection procedure} unix { global lostSel setup setupbg @@ -369,7 +369,7 @@ test select-4.3 {Tk_ClearSelection procedure} { setup list [selection clear .f1] [selection clear .f1] } {{} {}} -test select-4.4 {Tk_ClearSelection procedure} {unixOnly} { +test select-4.4 {Tk_ClearSelection procedure} unix { global lostSel setup setupbg @@ -397,7 +397,7 @@ test select-4.5 {Tk_ClearSelection procedure} {altDisplay} { update list $lostSel $lostSel2 } {owned lost2} -test select-4.6 {Tk_ClearSelection procedure} {unixOnly altDisplay} { +test select-4.6 {Tk_ClearSelection procedure} {unix altDisplay} { setup .f1 setup .f2 $env(TK_ALT_DISPLAY) setupbg @@ -476,7 +476,7 @@ test select-5.8 {Tk_GetSelection procedure} { selection handle .f1 {weirdHandler STRING} list [selection get] $selInfo [catch {selection get} msg] $msg } "$longValue {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000} 1 {PRIMARY selection doesn't exist or form \"STRING\" not defined}" -test select-5.9 {Tk_GetSelection procedure} {unixOnly} { +test select-5.9 {Tk_GetSelection procedure} unix { setup setupbg selection handle -selection PRIMARY .f1 {handler TEST} TEST @@ -488,7 +488,7 @@ test select-5.9 {Tk_GetSelection procedure} {unixOnly} { cleanupbg lappend result $selInfo } {{Test value} {TEST 0 4000}} -test select-5.10 {Tk_GetSelection procedure} {unixOnly} { +test select-5.10 {Tk_GetSelection procedure} unix { setup setupbg selection handle -selection PRIMARY .f1 {handler TEST} TEST @@ -530,7 +530,7 @@ test select-5.12 {Tk_GetSelection procedure} {altDisplay} { lappend result [catch {selection get -displayof .f2 TEST} msg] $msg \ $selInfo } {0 {Test value} {TEST 0 4000} 1 {PRIMARY selection doesn't exist or form "TEST" not defined} {}} -test select-5.13 {Tk_GetSelection procedure} {unixOnly altDisplay} { +test select-5.13 {Tk_GetSelection procedure} {unix altDisplay} { setup .f1 setup .f2 $env(TK_ALT_DISPLAY) setupbg @@ -548,7 +548,7 @@ test select-5.13 {Tk_GetSelection procedure} {unixOnly altDisplay} { cleanupbg lappend result $selInfo } {{Test value} {Test value2} {TEST2 0 4000 TEST 0 4000}} -test select-5.14 {Tk_GetSelection procedure} {unixOnly altDisplay} { +test select-5.14 {Tk_GetSelection procedure} {unix altDisplay} { setup .f1 setup .f2 $env(TK_ALT_DISPLAY) setupbg @@ -780,7 +780,7 @@ test select-7.1 {TkSelDeadWindow procedure} nonPortable { # Check reentrancy on losing selection -test select-8.1 {TkSelEventProc procedure} -constraints unixOnly -setup { +test select-8.1 {TkSelEventProc procedure} -constraints unix -setup { setup setupbg } -body { @@ -796,7 +796,7 @@ test select-8.1 {TkSelEventProc procedure} -constraints unixOnly -setup { test select-9.1 {SelCvtToX and SelCvtFromX procedures} -setup { setup setupbg -} -constraints unixOnly -body { +} -constraints unix -body { set selValue "1024" set selInfo "" selection handle -selection PRIMARY -format INTEGER -type TEST \ @@ -807,7 +807,7 @@ test select-9.1 {SelCvtToX and SelCvtFromX procedures} -setup { cleanupbg lappend result $selInfo } -result {0x400 {TEST 0 4000}} -test select-9.2 {SelCvtToX and SelCvtFromX procedures} unixOnly { +test select-9.2 {SelCvtToX and SelCvtFromX procedures} unix { setup setupbg set selValue "1024 0xffff 2048 -2 " @@ -819,7 +819,7 @@ test select-9.2 {SelCvtToX and SelCvtFromX procedures} unixOnly { cleanupbg lappend result $selInfo } {{0x400 0xffff 0x800 0xfffffffe} {TEST 0 4000}} -test select-9.3 {SelCvtToX and SelCvtFromX procedures} unixOnly { +test select-9.3 {SelCvtToX and SelCvtFromX procedures} unix { setup setupbg set selValue " " @@ -831,7 +831,7 @@ test select-9.3 {SelCvtToX and SelCvtFromX procedures} unixOnly { cleanupbg lappend result $selInfo } {{} {TEST 0 4000}} -test select-9.4 {SelCvtToX and SelCvtFromX procedures} unixOnly { +test select-9.4 {SelCvtToX and SelCvtFromX procedures} unix { setup setupbg set selValue "16 foobar 32" @@ -849,7 +849,7 @@ test select-9.4 {SelCvtToX and SelCvtFromX procedures} unixOnly { # note, we are not testing MULTIPLE style selections # most control paths have been exercised above -test select-10.1 {ConvertSelection procedure, race with selection clear} {unixOnly} { +test select-10.1 {ConvertSelection procedure, race with selection clear} unix { setup proc Ready {fd} { variable x @@ -877,7 +877,7 @@ test select-10.1 {ConvertSelection procedure, race with selection clear} {unixOn catch {close $fd} lappend x $selInfo } {{1 PRIMARY selection doesn't exist or form "STRING" not defined} {}} -test select-10.2 {ConvertSelection procedure} {unixOnly} { +test select-10.2 {ConvertSelection procedure} unix { setup setupbg set selValue [string range $longValue 0 3999] @@ -888,7 +888,7 @@ test select-10.2 {ConvertSelection procedure} {unixOnly} { cleanupbg lappend result $selInfo } [list [string range $longValue 0 3999] {STRING 0 4000 STRING 4000 4000 STRING 0 4000 STRING 4000 4000}] -test select-10.3 {ConvertSelection procedure} {unixOnly} { +test select-10.3 {ConvertSelection procedure} unix { setup setupbg selection handle .f1 ERROR errHandler @@ -899,7 +899,7 @@ test select-10.3 {ConvertSelection procedure} {unixOnly} { } {{PRIMARY selection doesn't exist or form "ERROR" not defined}} # testing timers # This one hangs in Exceed -test select-10.4 {ConvertSelection procedure} {unixOnly noExceed} { +test select-10.4 {ConvertSelection procedure} {unix noExceed} { setup setupbg set selValue $longValue @@ -911,7 +911,7 @@ test select-10.4 {ConvertSelection procedure} {unixOnly noExceed} { cleanupbg lappend result $selInfo } {{selection owner didn't respond} {STRING 0 4000 STRING 4000 4000 STRING 8000 4000 STRING 12000 4000 STRING 16000 4000 STRING 0 4000 STRING 4000 4000}} -test select-10.5 {ConvertSelection procedure, reentrancy issues} {unixOnly} { +test select-10.5 {ConvertSelection procedure, reentrancy issues} unix { setup setupbg set selValue "Test value" @@ -923,7 +923,7 @@ test select-10.5 {ConvertSelection procedure, reentrancy issues} {unixOnly} { cleanupbg lappend result $selInfo } {{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 STRING 0 4000}} -test select-10.6 {ConvertSelection procedure, reentrancy issues} {unixOnly} { +test select-10.6 {ConvertSelection procedure, reentrancy issues} unix { proc weirdHandler {type offset count} { destroy .f1 handler $type $offset $count @@ -942,7 +942,7 @@ test select-10.6 {ConvertSelection procedure, reentrancy issues} {unixOnly} { ############################################################################## # testing reentrancy -test select-11.1 {TkSelPropProc procedure} {unixOnly} { +test select-11.1 {TkSelPropProc procedure} unix { setup setupbg set selValue $longValue @@ -959,7 +959,7 @@ test select-11.1 {TkSelPropProc procedure} {unixOnly} { ############################################################################## # Note, this assumes we are using CurrentTtime -test select-12.1 {DefaultSelection procedure} {unixOnly} { +test select-12.1 {DefaultSelection procedure} unix { setup set result [selection get -type TIMESTAMP] setupbg @@ -967,7 +967,7 @@ test select-12.1 {DefaultSelection procedure} {unixOnly} { cleanupbg set result } {0x0 0x0} -test select-12.2 {DefaultSelection procedure} {unixOnly} { +test select-12.2 {DefaultSelection procedure} unix { setup set result [lsort [list [selection get -type TARGETS]]] setupbg @@ -975,7 +975,7 @@ test select-12.2 {DefaultSelection procedure} {unixOnly} { cleanupbg set result } {{MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-12.3 {DefaultSelection procedure} {unixOnly} { +test select-12.3 {DefaultSelection procedure} unix { setup selection handle .f1 {handler TEST} TEST set result [list [lsort [selection get -type TARGETS]]] @@ -984,7 +984,7 @@ test select-12.3 {DefaultSelection procedure} {unixOnly} { cleanupbg set result } {{MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW} {MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-12.4 {DefaultSelection procedure} {unixOnly} { +test select-12.4 {DefaultSelection procedure} unix { setup set result "" lappend result [selection get -type TK_APPLICATION] @@ -993,7 +993,7 @@ test select-12.4 {DefaultSelection procedure} {unixOnly} { cleanupbg set result } [list [winfo name .] [winfo name .]] -test select-12.5 {DefaultSelection procedure} {unixOnly} { +test select-12.5 {DefaultSelection procedure} unix { setup set result [selection get -type TK_WINDOW] setupbg @@ -1011,7 +1011,7 @@ test select-12.6 {DefaultSelection procedure} { lappend result [selection get TARGETS] } {{Targets value} {TARGETS.f1 0 4000} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}} -test select-13.1 {SelectionSize procedure, handler deleted} {unixOnly} { +test select-13.1 {SelectionSize procedure, handler deleted} unix { proc badHandler {path type offset count} { global selValue selInfo abortCount incr abortCount -1 |