Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c0c0e30201764a1226675f88eb05268742694b04f2500b28db09fc0871d8c90e
Ticket: 53cad613d8a4de166e680f09a6c6399ebddbc17c
TIP 389 implementation makes Tk tests font-4.12 and font-4.15 fail
User & Date: fvogel on 2018-06-16 06:05:38
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    Since TIP 389 was committed in core-8-branch, that is since [e109760b1c], two tests from the Tk test suite started failing as follows:
    
    <verbatim>
    ==== font-4.12 font command: actual FAILED
    ==== Contents of test case:
    
        font actual {-family times} -- \ud800
    
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: expected a single character but got ""
        while executing
    "font actual {-family times} -- \ud800"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: TK VALUE FONT_SAMPLE
    ==== font-4.12 FAILED
    
    
    ==== font-4.15 font command: actual FAILED
    ==== Contents of test case:
    
        font actual {-family times} -- \udc00\ud800
    
    ---- Test completed normally; Return code was: 0
    ---- Return code should have been one of: 1
    ==== font-4.15 FAILED
    </verbatim>
    
    Both behaviors can be reproduced easily outside of the Tk test suite:
    
    <verbatim>
    % package require Tk
    8.7a2
    % font actual {-family times} -- \ud800    ; # font-4.12
    expected a single character but got ""
    % font actual {-family times} -- \udc00\ud800    ; # font-4.15
    -family times -size 12 -weight normal -slant roman -underline 0 -overstrike 0
    %
    </verbatim>
    
    Note that in contrast font-4.13 and font-4.14 do not fail, despite being very similar:
    
    <verbatim>
    % font actual {-family times} -- \udc00    ; # font-4.13
    -family times -size 12 -weight normal -slant roman -underline 0 -overstrike 0
    % font actual {-family times} -family -- \ud800\udc00    ; # font-4.14
    times
    </verbatim>
    
    I'm unsure whether implementation of TIP 389 has a bug, or if Tk should be changed to match TIP 389, but I'm inclined to suspect the former because the TIP states: <pre>As long as no Surrogates or characters >= U+010000 are used, all functions behave exactly the same as before.</pre>
    
  5. foundin changed to: "core-8-branch"
  6. is_private changed to: "0"
  7. login: "fvogel"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "a013af67114eccc19ad12b04f14923acea9e96b7"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "fvogel"
  14. subsystem changed to: "44. UTF-8 Strings"
  15. title changed to: "TIP 389 implementation makes Tk tests fail"
  16. type changed to: "Bug"