Tk Source Code

Ticket Change Details
Login
Overview

Artifact ID: 11ef4fed635859ef3dd9f91d42f9a1277368137d
Ticket: d4fb4e80d220e46e588f310291fd7a4205e8cd67
Image photo commands read/write/put do not accept "-" as first letter in file names resp. image data
User & Date: fvogel 2016-12-07 21:11:36
Changes

  1. assignee changed to: "fvogel"
  2. icomment:
    Thanks for the report, patch and test scripts.
    
    I have committed your patch in [http://core.tcl.tk/tk/timeline?r=bug-d4fb4e80d2|branch bug-d4fb4e80d2] for easy testing.
    
    <TODO>: remaining work to do is to transform your test scripts into proper Tcl non-regression tests.
    
    Also, with this patch the following test now fails, which is certainly expected since it uses the syntax "options data" (as opposed to data before options, which is the only documented syntax AFAIK):
    
    <pre>
    ==== imgPhoto-4.29 ImgPhotoCmd procedure: put option FAILED
    ==== Contents of test case:
    
        photo1 put -to 10 10 20 20 {{white}}
        photo1 get 19 19
    
    ---- Test generated error; Return code was: 1
    ---- Return code should have been one of: 0 2
    ---- errorInfo: can't parse color "-to"
        while executing
    "photo1 put -to 10 10 20 20 {{white}}"
        ("uplevel" body line 2)
        invoked from within
    "uplevel 1 $script"
    ---- errorCode: TK VALUE COLOR
    ==== imgPhoto-4.29 FAILED
    </pre>
    
    Changing this test by swapping the order of the -to option and the data {{white}} makes it pass.
    
    The question here is, as you mentioned, how many scripts using the wrong syntax will be broken by fixing the bug. I suggest to fix this only in trunk (i.e. not in the 8.6 maintenance releases).
    
  3. login: "fvogel"
  4. mimetype: "text/x-fossil-wiki"