Tk Source Code

View Ticket
Login
Ticket UUID: cc0ba31920372273eb487dc5da8c508488e76390
Title: New failing tests: text-9.2.46, winClipboard, winfont-2.[789]
Type: Bug Version: trunk [44b24118]
Submitter: oehhar Created on: 2015-08-31 11:34:23
Subsystem: 18. [text] Assigned To: fvogel
Priority: 7 High Severity: Minor
Status: Closed Last Modified: 2015-10-19 20:45:58
Resolution: Fixed Closed By: fvogel
    Closed on: 2015-10-19 20:45:58
Description:

Running the test suite with current trunk [44b24118] (2015-08-31), I get some new failures compared to tcl 8.6.4 (on the same system and compile method).

The first failure looks important to me, the clipboard tests were never very robust, the font tests might be due to windows changes (word installation might have braught new fonts)...

System: Win 8.1 64 bit Compiled with Makefile.VC with MSVC6 PSDK2003 or MSVC14

==== text-9.2.46 TextWidgetCmd procedure, "count" option FAILED
==== Contents of test case:

    for {set i 1} {$i < 5} {incr i} {
      #              0          1          2          3          4
      #              012345 678901234 567890123 456789012 34567890123456789
      .mytop.t insert end "Line $i+++Line $i---Line $i///Line $i - This is Line [format %c [expr 64+$i]]\n"
    }
    .mytop.t tag configure hidden -elide true
    .mytop.t tag add hidden 2.15 3.10
    .mytop.t configure -wrap char
    lappend res [.mytop.t count -displaylines 2.0 3.0]
    lappend res [.mytop.t count -displaylines 2.0 3.40]

---- Result was:
0 3
---- Result should have been (exact matching):
1 3
==== text-9.2.46 FAILED

==== winClipboard-1.2 TkSelGetSelection FAILED
==== Contents of test case:

    clipboard append {}
    list [selection get -selection CLIPBOARD] [testclipboard]

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

==== winClipboard-2.1 TkSelUpdateClipboard reentrancy problem FAILED
==== Contents of test case:

    clipboard append -type OUR_ACTION "action data"
    clipboard append "string data"
    update
    list [selection get -selection CLIPBOARD -type OUR_ACTION] [testclipboard]

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

---- winClipboard-2.2 start


==== winClipboard-2.2 TkSelUpdateClipboard reentrancy problem FAILED
==== Contents of test case:

    clipboard append -type OUR_ACTION "new data"
    clipboard append "more data in string"
    update
    list [testclipboard] [selection get -selection CLIPBOARD -type OUR_ACTION]

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

==== winfont-2.7 TkpGetFontFromAttributes procedure: Times fonts FAILED
==== Contents of test case:

    lappend x [font actual {-family "Times"} -family]
    lappend x [font actual {-family "New York"} -family]
    lappend x [font actual {-family "Times New Roman"} -family]

---- Result was:
{Times New Roman} {New York} {Times New Roman}
---- Result should have been (exact matching):
{Times New Roman} {Times New Roman} {Times New Roman}
==== winfont-2.7 FAILED

---- winfont-2.8 start


==== winfont-2.8 TkpGetFontFromAttributes procedure: Courier fonts FAILED
==== Contents of test case:

    lappend x [font actual {-family "Courier"} -family]
    lappend x [font actual {-family "Monaco"} -family]
    lappend x [font actual {-family "Courier New"} -family]

---- Result was:
{Courier New} Monaco {Courier New}
---- Result should have been (exact matching):
{Courier New} {Courier New} {Courier New}
==== winfont-2.8 FAILED

---- winfont-2.9 start


==== winfont-2.9 TkpGetFontFromAttributes procedure: Helvetica fonts FAILED
==== Contents of test case:

    lappend x [font actual {-family "Helvetica"} -family]
    lappend x [font actual {-family "Geneva"} -family]
    lappend x [font actual {-family "Arial"} -family]

---- Result was:
Arial Geneva Arial
---- Result should have been (exact matching):
Arial Arial Arial
==== winfont-2.9 FAILED

User Comments: fvogel added on 2015-10-19 20:45:58:
Robustified text-9.2.46 in both core-8-5-branch and trunk. Closing.

fvogel added on 2015-10-18 21:30:42:
Failing for me on Debian 6.0 as follows:


==== text-9.2.46 TextWidgetCmd procedure, "count" option FAILED
==== Contents of test case:

    for {set i 1} {$i < 5} {incr i} {
      #              0          1          2          3          4
      #              012345 678901234 567890123 456789012 34567890123456789
      .mytop.t insert end "Line $i+++Line $i---Line $i///Line $i - This is Line [format %c [expr 64+$i]]\n"
    }
    .mytop.t tag configure hidden -elide true
    .mytop.t tag add hidden 2.20 3.10
    .mytop.t configure -wrap char
    lappend res [.mytop.t count -displaylines 2.0 3.0]
    lappend res [.mytop.t count -displaylines 2.0 3.40]

---- Result was:
1 4
---- Result should have been (exact matching):
1 3
==== text-9.2.46 FAILED

fvogel added on 2015-10-18 21:21:26:
Re-opened since text-9.2.46 fails for me on Debian 6.0.
I really should find a way of making this more reliable.

oehhar (claiming to be [email protected]) added on 2015-10-02 08:41:03:

(again, now with wiki active) The text widget part is fixed.

The clipboard part is continued with ticket [9b0f3ee5].

The font part is continued with ticket [4914ce87].


oehhar added on 2015-10-02 07:05:50:
The text widget part is fixed.

The clipboard part is continued with ticket [9b0f3ee5] [http://core.tcl.tk/tk/tktview/9b0f3ee54e431ae7bc301525b599e4320d5d47f2].

The font part is continued with ticket [4914ce87] [http://core.tcl.tk/tk/tktview/4914ce8783109be66225ccc7c971f82a8972f86d].

fvogel added on 2015-09-13 13:01:16:
I have changed the test case for text-9.2.46 so that it passes.

New font failures (winfont-2.[789]): I don't know what to do with these tests. They apparently check that the family returned for some very common fonts (maybe default fonts that everybody is expected to have?) is the expected one. No idea why this would fail.

Clipboard tests: unreliable, perhaps, yes, but still worth to be fixed, or...?

oehhar added on 2015-09-08 08:08:12:

Dear Francois,

thank you looking into that.

Indeed, the test text-9.2.46 passes with the proposed change. It already passes with:

.mytop.t tag add hidden 2.16 3.10
(e.g. by increasing it by one).

I don't bother about the failed clipboard tests. They often fail more or less randomly (see http://wiki.tcl.tk/37529) The failures observed were already present on Windows Vista for me.

Can we do something about the new font failures ?

Could you correct the test case and close the ticket ?

Thank you, Harald


fvogel added on 2015-09-02 06:30:53:
Regarding text-9.2.46:

The failure is certainly due to a font change.

Can you try to change (in the test case):
    .mytop.t tag add hidden 2.15 3.10
into:
    .mytop.t tag add hidden 2.20 3.10 
or even a bit more than 2.20, and check whether it passes then?

It's hard to write these tests so that they are robust to (default!) font changes.


Regarding winClipboard tests failures, something that might be linked has been reported in the newsgroup:

https://groups.google.com/d/msg/comp.lang.tcl/311rQcMZYJQ/r2s34jh2BwAJ

fvogel added on 2015-08-31 19:11:15:
Well, I see exactly... zero failures in the Tk test suite, in both the current trunk and for the core-8-6-4 tag.

Windows Vista, compilation with makefile.vc with Visual 9 (Express Edition).

Could you perhaps analyze further...?

fvogel added on 2015-08-31 12:09:38:
Will check (regarding the text widget test case failure).