Tk Source Code

View Ticket
Login
Ticket UUID: 1475156
Title: Numerous select.test failures on macOS
Type: Bug Version: obsolete: 8.5a4
Submitter: vincentdarley Created on: 2006-04-23 21:23:56
Subsystem: 53. [selection] Assigned To: fvogel
Priority: 2 Severity: Minor
Status: Closed Last Modified: 2018-07-17 19:01:31
Resolution: Fixed Closed By: fvogel
    Closed on: 2018-07-17 19:01:31
Description:
The following tests fail in cvs HEAD:

select.test

==== select-1.4.1 Tk_CreateSelHandler procedure FAILED
==== Contents of test case:

    setup
    selection handle .f1 {handler TEST} TEST
    selection handle .f1 {handler STRING}
    lsort [selection get TARGETS]

---- Result was:
MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW
---- Result should have been (exact matching):
MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW UTF8_STRING
==== select-1.4.1 FAILED


==== select-1.6.1 Tk_CreateSelHandler procedure FAILED
==== Contents of test case:

    global selValue selInfo
    setup
    selection handle .f1 {handler TEST} TEST
    selection handle .f1 {handler STRING}
    set selValue ""
    set selInfo ""
    selection get
    selection get -type TEST
    selection handle .f1 {handler TEST2} TEST
    selection get -type TEST
    list [set selInfo] [lsort [selection get TARGETS]]

---- Result was:
{STRING 0 4000 TEST 0 4000 TEST2 0 4000} {MULTIPLE STRING 
TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}
---- Result should have been (exact matching):
{STRING 0 4000 TEST 0 4000 TEST2 0 4000} {MULTIPLE STRING 
TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW 
UTF8_STRING}
==== select-1.6.1 FAILED


==== select-1.7.1 Tk_CreateSelHandler procedure FAILED
==== Contents of test case:

    setup
    selection own -selection CLIPBOARD .f1
    selection handle -selection CLIPBOARD .f1 {handler TEST} TEST
    selection handle -selection PRIMARY .f1 {handler TEST2} STRING
    list [lsort [selection get -selection PRIMARY TARGETS]]  [lsort 
[selection get -selection CLIPBOARD TARGETS]]

---- Result was:
{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW} 
{MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}
---- Result should have been (exact matching):
{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW 
UTF8_STRING} {MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW}
==== select-1.7.1 FAILED


==== select-2.1 Tk_DeleteSelHandler procedure FAILED
==== Contents of test case:

    setup
    selection handle .f1 {handler STRING}
    selection handle -type TEST .f1 {handler TEST}
    selection handle -type USER .f1 {handler USER}
    set result [list [lsort [selection get TARGETS]]]
    selection handle -type TEST .f1 {}
    lappend result [lsort [selection get TARGETS]]

---- Result was:
{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW USER} {MULTIPLE STRING TARGETS TIMESTAMP 
TK_APPLICATION TK_WINDOW USER}
---- Result should have been (exact matching):
{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW USER UTF8_STRING} {MULTIPLE STRING TARGETS 
TIMESTAMP TK_APPLICATION TK_WINDOW USER UTF8_STRING}
==== select-2.1 FAILED


==== select-2.2 Tk_DeleteSelHandler procedure FAILED
==== Contents of test case:

    setup
    selection handle .f1 {handler STRING}
    selection handle -type TEST .f1 {handler TEST}
    selection handle -type USER .f1 {handler USER}
    set result [list [lsort [selection get TARGETS]]]
    selection handle -type USER .f1 {}
    lappend result [lsort [selection get TARGETS]]

---- Result was:
{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW USER} {MULTIPLE STRING TARGETS TEST TIMESTAMP 
TK_APPLICATION TK_WINDOW}
---- Result should have been (exact matching):
{MULTIPLE STRING TARGETS TEST TIMESTAMP TK_APPLICATION 
TK_WINDOW USER UTF8_STRING} {MULTIPLE STRING TARGETS TEST 
TIMESTAMP TK_APPLICATION TK_WINDOW UTF8_STRING}
==== select-2.2 FAILED


==== select-2.3 Tk_DeleteSelHandler procedure FAILED
==== Contents of test case:

    setup
    selection own -selection CLIPBOARD .f1
    selection handle -selection PRIMARY .f1 {handler STRING}
    selection handle -selection CLIPBOARD .f1 {handler STRING}
    selection handle -selection CLIPBOARD .f1 {}
    list [lsort [selection get TARGETS]]  [lsort [selection get -selection 
CLIPBOARD TARGETS]]

---- Result was:
{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW} 
{MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}
---- Result should have been (exact matching):
{MULTIPLE STRING TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW 
UTF8_STRING} {MULTIPLE TARGETS TIMESTAMP TK_APPLICATION 
TK_WINDOW}
==== select-2.3 FAILED


==== select-3.7 Tk_OwnSelection procedure FAILED
==== Contents of test case:

    global lostSel
    setup
    setupbg
    set lostSel {owned}
    selection own -command { set lostSel {lost1} } .f1
    update
    set result {}
    lappend result [dobg { selection own . }]
    lappend result [dobg {selection own}]
    update
    cleanupbg
    lappend result $lostSel

---- Result was:
{} . owned
---- Result should have been (exact matching):
{} . lost1
==== select-3.7 FAILED


==== select-4.4 Tk_ClearSelection procedure FAILED
==== Contents of test case:

    global lostSel
    setup
    setupbg
    set lostSel {owned}
    selection own -command { set lostSel {lost1} } .f1
    update
    set result {}
    lappend result [dobg {selection clear; update}]
    update
    cleanupbg
    lappend result [selection own]

---- Result was:
{} .f1
---- Result should have been (exact matching):
{} {}
==== select-4.4 FAILED


==== select-5.9 Tk_GetSelection procedure FAILED
==== Contents of test case:

    setup
    setupbg
    selection handle -selection PRIMARY .f1 {handler TEST} TEST
    update
    set selValue "Test value"
    set selInfo ""
    set result ""
    lappend result [dobg {selection get TEST}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
{Test value} {TEST 0 4000}
==== select-5.9 FAILED


==== select-5.10 Tk_GetSelection procedure FAILED
==== Contents of test case:

    setup
    setupbg
    selection handle -selection PRIMARY .f1 {handler TEST} TEST
    update
    set selValue "Test value"
    set selInfo ""
    selection own .f1
    set result ""
    lappend result [dobg {selection get TEST} 1]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
{selection owner didn't respond} {}
==== select-5.10 FAILED


==== select-9.1 SelCvtToX and SelCvtFromX procedures FAILED
==== Contents of test case:

    set selValue "1024"
    set selInfo ""
    selection handle -selection PRIMARY -format INTEGER -type 
TEST  .f1 {handler TEST}
    update
    set result ""
    lappend result [dobg {selection get TEST}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
0x400 {TEST 0 4000}
==== select-9.1 FAILED


==== select-9.2 SelCvtToX and SelCvtFromX procedures FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue "1024 0xffff  2048 -2  "
    set selInfo ""
    selection handle -selection PRIMARY -format INTEGER -type 
TEST  .f1 {handler TEST}
    set result ""
    lappend result [dobg {selection get TEST}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
{0x400 0xffff 0x800 0xfffffffe} {TEST 0 4000}
==== select-9.2 FAILED


==== select-9.3 SelCvtToX and SelCvtFromX procedures FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue "   "
    set selInfo ""
    selection handle -selection PRIMARY -format INTEGER -type 
TEST  .f1 {handler TEST}
    set result ""
    lappend result [dobg {selection get TEST}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
{} {TEST 0 4000}
==== select-9.3 FAILED


==== select-9.4 SelCvtToX and SelCvtFromX procedures FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue "16 foobar 32"
    set selInfo ""
    selection handle -selection PRIMARY -format INTEGER -type 
TEST  .f1 {handler TEST}
    set result ""
    lappend result [dobg {selection get TEST}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "TEST" not defined} {}
---- Result should have been (exact matching):
{0x10 0x0 0x20} {TEST 0 4000}
==== select-9.4 FAILED


==== select-9.5 SelCvtToX and SelCvtFromX procedures FAILED
==== Contents of test case:

    # Ensure that lists of atoms are constructed correctly, even when the
    # atom names have spaces in. [Bug 1353414]
    set selValue "foo bar"
    set selInfo ""
    set selType {text/x-tk-test;detail="foo bar"}
    selection handle -selection PRIMARY -format STRING -type $selType  
.f1 [list handler $selType]
    lsort [dobg {selection get TARGETS}]

---- Result was:
PRIMARY TARGETS defined doesn't exist form not or selection
---- Result should have been (exact matching):
MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW {text/x-
tk-test;detail="foo bar"}
==== select-9.5 FAILED


==== select-10.2 ConvertSelection procedure FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue [string range $longValue 0 3999]
    set selInfo ""
    selection handle .f1 {handler STRING}
    set result ""
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
Aa.1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.11a.12a.13a.14Ba.1a.2a.3a.4a.5a.
6a.7a.8a.9a.10a.11a.12a.13a.14Ca.1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.
11a.12a.13a.14Da.1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.11a.12a.13a.14Ea.
1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.11a.12a.13a.14Fa.1a.2a.3a.4a.5a.6a.
7a.8a.9a.10a.11a.12a.13a.14Ga.1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.11a.
12a.13a.14Ha.1a.2a.3a.4a.5a.6a.7a.8a.9a.10a.11a.12a.13a.14Ia.1a.2a.
3a.4a.5a.6a.7a.8a.9a.10a.11a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.11e.12e.13e.14De.
1e.2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.12e.13e.14Ee.1e.2e.3e.4e.5e.6e.
7e.8e.9e.10e.11e.12e.13e.14Fe.1e.2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.
12e.13e.14Ge.1e.2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.12e.13e.14He.1e.
2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.12e.13e.14Ie.1e.2e.3e.4e.5e.6e.7e.
8e.9e.10e.11e.12e.13e.14Ke.1e.2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.12e.
13e.14Le.1e.2e.3e.4e.5e.6e.7e.8e.9e.10e.11e.12e.13e.14Me.1e.2e.3e.
4e.5e.6e.7e.8e.9e.10e.11e.12e.13e.14Ne.1e.2e.3e.4e.5e.6e.7e.8e.9e.
10e.11e.12e.13e.14Af.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Bf.1f.
2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Cf.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.
11f.12f.13f.14Df.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Ef.1f.2f.3f.
4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Ff.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.
12f.13f.14Gf.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Hf.1f.2f.3f.4f.
5f.6f.7f.8f.9f.10f.11f.12f.13f.14If.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.
13f.14Kf.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Lf.1f.2f.3f.4f.5f.6f.
7f.8f.9f.10f.11f.12f.13f.14Mf.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.
14Nf.1f.2f.3f.4f.5f.6f.7f.8f.9f.10f.11f.12f.13f.14Ag.1g.2g.3g.4g.5g.6g.
7g.8g.9g.10g.11g.12g.13g.14Bg.1g.2g.3g.4g.5g.6g.7g.8g.9g.10g.
11g.12g.13g.14Cg.1g.2g.3g.4g.5g.6g.7g.8g.9g.10g.11g.12g.13g.
14Dg.1g.2g.3g.4g.5g.6g.7g.8g.9g.10g.11g.12g.13g.14Eg.1g.2g.3g.
4g.5g.6g.7g.8g.9g.10g.11g.12g.13g.14Fg.1g.2g.3g.4g.5 {STRING 0 
4000 STRING 4000 4000 STRING 0 4000 STRING 4000 4000}
==== select-10.2 FAILED


==== select-10.4 ConvertSelection procedure FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue $longValue
    set selInfo ""
    selection handle .f1 {errIncrHandler STRING}
    set result ""
    set pass 0
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
{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}
==== select-10.4 FAILED


==== select-10.5 ConvertSelection procedure, reentrancy issues 
FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue "Test value"
    set selInfo ""
    selection handle -type TEST .f1 { handler TEST }
    selection handle -type STRING .f1 { badHandler .f1 STRING }
    set result ""
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 
STRING 0 4000}
==== select-10.5 FAILED


==== select-10.6 ConvertSelection procedure, reentrancy issues 
FAILED
==== Contents of test case:

    proc weirdHandler {type offset count} {
destroy .f1
handler $type $offset $count
    }
    setup
    setupbg
    set selValue $longValue
    set selInfo ""
    selection handle .f1 {weirdHandler STRING}
    set result ""
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
{PRIMARY selection doesn't exist or form "STRING" not defined} {STRING 
0 4000}
==== select-10.6 FAILED


==== select-11.1 TkSelPropProc procedure FAILED
==== Contents of test case:

    setup
    setupbg
    set selValue $longValue
    set selInfo ""
    selection handle -type TEST .f1 { handler TEST }
    selection handle -type STRING .f1 { reallyBadHandler .f1 STRING }
    set result ""
    set pass 0
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
{selection owner didn't respond} {.f1 STRING 0 4000 .f1 STRING 4000 
4000 .f1 STRING 8000 4000 .f1 STRING 12000 4000 .f1 STRING 16000 
4000 .f1 STRING 0 4000 .f1 STRING 4000 4000}
==== select-11.1 FAILED


==== select-12.1 DefaultSelection procedure FAILED
==== Contents of test case:

    setup
    set result [selection get -type TIMESTAMP]
    setupbg
    lappend result [dobg {selection get -type TIMESTAMP}]
    cleanupbg
    set result

---- Result was:
0x0 {PRIMARY selection doesn't exist or form "TIMESTAMP" not defined}
---- Result should have been (exact matching):
0x0 0x0
==== select-12.1 FAILED


==== select-12.2 DefaultSelection procedure FAILED
==== Contents of test case:

    setup
    set result [lsort [list [selection get -type TARGETS]]]
    setupbg
    lappend result [dobg {lsort [selection get -type TARGETS]}]
    cleanupbg
    set result

---- Result was:
{MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW} 
{PRIMARY selection doesn't exist or form "TARGETS" not defined}
---- Result should have been (exact matching):
{MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW} 
{MULTIPLE TARGETS TIMESTAMP TK_APPLICATION TK_WINDOW}
==== select-12.2 FAILED


==== select-12.3 DefaultSelection procedure FAILED
==== Contents of test case:

    setup
    selection handle .f1 {handler TEST} TEST
    set result [list [lsort [selection get -type TARGETS]]]
    setupbg
    lappend result [dobg {lsort [selection get -type TARGETS]}]
    cleanupbg
    set result

---- Result was:
{MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW} 
{PRIMARY selection doesn't exist or form "TARGETS" not defined}
---- Result should have been (exact matching):
{MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW} 
{MULTIPLE TARGETS TEST TIMESTAMP TK_APPLICATION TK_WINDOW}
==== select-12.3 FAILED


==== select-12.4 DefaultSelection procedure FAILED
==== Contents of test case:

    setup
    set result ""
    lappend result [selection get -type TK_APPLICATION]
    setupbg
    lappend result [dobg {selection get -type TK_APPLICATION}]
    cleanupbg
    set result

---- Result was:
tktest {PRIMARY selection doesn't exist or form "TK_APPLICATION" not 
defined}
---- Result should have been (exact matching):
tktest tktest
==== select-12.4 FAILED


==== select-12.5 DefaultSelection procedure FAILED
==== Contents of test case:

    setup
    set result [selection get -type TK_WINDOW]
    setupbg
    lappend result [dobg {selection get -type TK_WINDOW}]
    cleanupbg
    set result

---- Result was:
.f1 {PRIMARY selection doesn't exist or form "TK_WINDOW" not defined}
---- Result should have been (exact matching):
.f1 .f1
==== select-12.5 FAILED


==== select-13.1 SelectionSize procedure, handler deleted FAILED
==== Contents of test case:

    proc badHandler {path type offset count} {
global selValue selInfo abortCount
incr abortCount -1
if {$abortCount == 0} {
    selection handle -type $type $path {}
}
lappend selInfo $path $type $offset $count
set numBytes [expr {[string length $selValue] - $offset}]
if {$numBytes <= 0} {
    return ""
}
string range $selValue $offset [expr $numBytes+$offset]
    }
    setup
    setupbg
    set selValue $longValue
    set selInfo ""
    selection handle .f1 {badHandler .f1 STRING}
    set result ""
    set abortCount 2
    lappend result [dobg {selection get}]
    cleanupbg
    lappend result $selInfo

---- Result was:
{PRIMARY selection doesn't exist or form "STRING" not defined} {}
---- Result should have been (exact matching):
{PRIMARY selection doesn't exist or form "STRING" not defined} {.f1 
STRING 0 4000 .f1 STRING 4000 4000}
==== select-13.1 FAILED


Tests ended at Sun Apr 23 22:19:00 BST 2006
all.tcl:Total109Passed68Skipped15Failed26
Sourced 1 Test Files.
Files with failing tests: select.test
Number of tests skipped for each constraint:
8altDisplay
1nonPortable
6win
User Comments: fvogel added on 2018-07-17 19:01:31:
Merged to core-8-6-branch and trunk.

fvogel added on 2018-07-08 20:25:54: (text/x-fossil-wiki)
Ditto for clipboard-6.2.

This test needs to be constrained by "x11", not by "unix". This is [7b6bf3cbc7]

fvogel added on 2018-07-07 21:29:38: (text/x-fossil-wiki)
Same issue exists with tests from unixSelect.test, which fail for the same reason as follows:

<verbatim>
==== unixSelect-1.1 TkSelGetSelection procedure: simple i18n text FAILED
==== Contents of test case:

    pack [entry .e]
    update
    .e insert 0 \u00fcber
    .e selection range 0 end
    dobg {string length [selection get]}

---- Result was:
PRIMARY selection doesn't exist or form "STRING" not defined
---- Result should have been (exact matching):
4
==== unixSelect-1.1 FAILED



==== unixSelect-1.2 TkSelGetSelection procedure: simple i18n text, iso8859-1 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 \u00fc\u0444
        .e selection range 0 end
    }
    selection get

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "STRING" not defined
    while executing
"selection get"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.2 FAILED



==== unixSelect-1.3 TkSelGetSelection procedure: simple i18n text, iso2022 FAILED
==== Contents of test case:

    selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT .  {handler COMPOUND_TEXT}
    selection own .
    set selValue \u00fc\u0444
    set selInfo {}
    set result [dobg {
        set x [selection get -type COMPOUND_TEXT]
        list [string equal \u00fc\u0444 $x] [string length $x]
    }]
    lappend result $selInfo

---- Result was:
PRIMARY selection doesn't exist or form COMPOUND_TEXT not defined {}
---- Result should have been (exact matching):
1 2 {COMPOUND_TEXT 0 4000}
==== unixSelect-1.3 FAILED



==== unixSelect-1.4 TkSelGetSelection procedure: INCR i18n text, iso2022 FAILED
==== Contents of test case:

    # This test is subtle.  The selection ends up getting fetched twice by
    # Tk:  once to compute the length, and again to actually send the data.
    # The first time through, we don't convert the data to ISO2022, so the
    # buffer boundaries end up being different in the two passes.
    selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT .  {handler COMPOUND_TEXT}
    selection own .
    set selValue [string repeat x 3999]\u00fc\u0444[string repeat x 3999]
    set selInfo {}
    set result [dobg {
        set x [selection get -type COMPOUND_TEXT]
        list [string equal  [string repeat x 3999]\u00fc\u0444[string repeat x 3999] $x]  [string length $x]
    }]
    lappend result $selInfo

---- Result was:
PRIMARY selection doesn't exist or form COMPOUND_TEXT not defined {}
---- Result should have been (exact matching):
1 8000 {COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3999 COMPOUND_TEXT 7998 4000 COMPOUND_TEXT 0 4000 COMPOUND_TEXT 4000 3998 COMPOUND_TEXT 7997 4000}
==== unixSelect-1.4 FAILED



==== unixSelect-1.5 TkSelGetSelection procedure: simple i18n text, iso2022 FAILED
==== Contents of test case:

    selection handle -type COMPOUND_TEXT -format COMPOUND_TEXT .  {handler COMPOUND_TEXT}
    selection own .
    set selValue \u00fc\u0444
    set selInfo {}
    set result [dobg {
        set x [selection get -type COMPOUND_TEXT]
        list [string equal \u00fc\u0444 $x] [string length $x]
    }]
    lappend result $selInfo

---- Result was:
PRIMARY selection doesn't exist or form COMPOUND_TEXT not defined {}
---- Result should have been (exact matching):
1 2 {COMPOUND_TEXT 0 4000}
==== unixSelect-1.5 FAILED



==== unixSelect-1.6 TkSelGetSelection procedure: INCR i18n text FAILED
==== Contents of test case:

    dobg [subst -nobackslashes {entry .e; pack .e; update
    .e insert 0 \u00fcber$longValue
    .e selection range 0 end}]
    string length [selection get]

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "STRING" not defined
    while executing
"selection get"
    ("uplevel" body line 5)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.6 FAILED



==== unixSelect-1.7 TkSelGetSelection procedure: INCR i18n text FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 [string repeat x 3999]\u00fc
        .e selection range 0 end
    }
    selection get

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "STRING" not defined
    while executing
"selection get"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.7 FAILED



==== unixSelect-1.8 TkSelGetSelection procedure: INCR i18n text FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 \u00fc[string repeat x 3999]
        .e selection range 0 end
    }
    selection get

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "STRING" not defined
    while executing
"selection get"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.8 FAILED



==== unixSelect-1.9 TkSelGetSelection procedure: INCR i18n text FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 [string repeat x 3999]\u00fc[string repeat x 4000]
        .e selection range 0 end
    }
    selection get

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "STRING" not defined
    while executing
"selection get"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.9 FAILED



==== unixSelect-1.10 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 [string repeat x 3999]\u00fc
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.10 FAILED



==== unixSelect-1.11 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 \u00fc[string repeat x 3999]
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.11 FAILED



==== unixSelect-1.12 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 [string repeat x 3999]\u00fc[string repeat x 4000]
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: NONE
==== unixSelect-1.12 FAILED



==== unixSelect-1.13 TkSelGetSelection procedure: simple i18n text, utf-8 FAILED
==== Contents of test case:

    pack [entry .e]
    update
    .e insert 0 \u00fcber\u0444
    .e selection range 0 end
    dobg {string length [selection get -type UTF8_STRING]}

---- Result was:
PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
---- Result should have been (exact matching):
5
==== unixSelect-1.13 FAILED



==== unixSelect-1.14 TkSelGetSelection procedure: simple i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 \u00fc\u0444
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.14 FAILED



==== unixSelect-1.15 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 [string repeat [string repeat \u00c4\u00e4 50]\n 21]
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.15 FAILED



==== unixSelect-1.16 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [entry .e]
        update
        .e insert 0 i[string repeat [string repeat \u00c4\u00e4 50]\n 21]
        .e selection range 0 end
    }
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 8)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.16 FAILED



==== unixSelect-1.17 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [text .t]
        update
        .t insert 1.0 [string repeat [string repeat \u00c4\u00e4 50]\n 21]
        # Has to be selected in a separate stage
        .t tag add sel 1.0 21.end+1c
    }
    after 10
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 10)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.17 FAILED



==== unixSelect-1.18 TkSelGetSelection procedure: INCR i18n text, utf-8 FAILED
==== Contents of test case:

    dobg {
        pack [text .t]
        update
        .t insert 1.0 i[string repeat [string repeat \u00c4\u00e4 50]\n 21]
        # Has to be selected in a separate stage
        .t tag add sel 1.0 21.end+1c
    }
    after 10
    selection get -type UTF8_STRING

---- Test generated error; Return code was: 1
---- Return code should have been one of: 0 2
---- errorInfo: PRIMARY selection doesn't exist or form "UTF8_STRING" not defined
    while executing
"selection get -type UTF8_STRING"
    ("uplevel" body line 10)
    invoked from within
"uplevel 1 $script"
---- errorCode: TK SELECTION EXISTS
==== unixSelect-1.18 FAILED
</verbatim>

These tests need to be constrained by "x11", not by "unix". This is [fdb21d745c]

fvogel added on 2018-07-07 11:21:26: (text/x-fossil-wiki)
On macOS, the remaining failing select-* tests are select-3.7, 4.4, 5.9, 5.10, 9.1, 9.2, 9.3, 9.4, 9.5, 10.2, 10.4, 10.5, 10.6, 11.1, 12.1, 12.2, 12.3, 12.4, 12.5, 13.1

All these tests are currently constrained to "unix" because they exercise X selection ownership changes from one application to another, which in my understanding is a feature specific to this platform. For that purpose these tests make use of the background process procs in constraint.tcl (namely setupbg, cleanupbg...).

Now, since the constraint is "unix", these tests are also exercised on macOS aqua. Apparently they fail because the exercised features do not exist on this platform (they neither do on Windows). Another possibility could be that the bg procs in constraint.tcl would not work on aqua, however I don't see why this would be the case.

My conclusion is therefore that these tests should not be constrained to "unix" but rather to "x11", so that they would be exercised on X11 platforms only (and not on unix aqua).

Regarding the other tests in select.test that are constrained by "unix":

  * select-4.6, 5.13 and 5.14 (skipped in my setup because of non-satisfied "altDisplay" constraint) also use the bg procs and are constrained by "unix". These needs rather to be constrained by "x11" for the reasons stated above.

  * select-8.1 does curently not fail on macOS (constrained by "unix" and using the bg procs). It relies on the return value of the dobg procedure to be an empty string. As it is written, it will succeed on all platforms even if unconstrained. However, what we really want to check is that when claiming the CLIPBOARD selection from the bg proc (in the . window from another application), the -command script gets called, that is the .f1 window gets destroyed in the interpreter from the test and there is no crash because of this. The test needs to check for "winfo children ." to be empty, and be constrained to "x11".

  * select-10.1 (constrained by "unix") does not fail on macOS, but I guess it would if it was written to use the bg procs. It does not use them because of [https://core.tcl.tk/tk/info/cda2e66757f87625|a comment there from Don Porter] stating using the bg procs there would cause a mysterious broken pipe. I'll constraint this test to x11.

  * select-10.3 (constrained by "unix") does not fail on macOS despite it uses the bg procs. This is because it exercises an error case that happens to be the same on Linux and macOS. On Windows it would give the same error result, therefore this test could be unconstrained. For consistency however, and because that was the original intent I think, I'll constrain it to x11.

I have committed a patch with all these changes, see [90f8e7bc9d].

fvogel added on 2018-07-06 17:56:54:
select-1.4.1, select-1.6.1, select-1.7.1, select-2.1, select-2.2 and select-2.3 do not longer fail as of current core-8-6-branch.

All other tests continue to fail on macOS.