Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: 68e01eef2f3187dcc03be6342dd89f08bd298099
Ticket: 8d5f5b80343e8e7d21d4dd96343a281895380ffd
string tolower does not invalidate list representation
User & Date: oehhar 2014-02-25 14:10:04
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    <h1>Issue</h1>
    string tolower does not remove a list representation in some circumstances
    
    <h1>Environment</h1>
       *   Fossil Trunk [29b5d483ec]
       *   Compiled with MSVC6++, SDK2003SP1 and Makefile.vc
       *   Windows Vista 32 bit GER
    
    <h1>Demonstration</h1>
    I stumbled over the fact, that the following test failed:
    <verbatim>
    ==== cmdAH-6.4 Tcl_FileObjCmd: volumes FAILED
    ==== Contents of test case:
    
        set volumeList [string tolower [file volumes]]
        set element [lsearch -exact $volumeList "c:/"]
        list [expr {$element>-1}] [glob -nocomplain [lindex $volumeList
    $element]*]
    
    ---- Result was:
    0 {aclocal.m4 buildall.vc.bat cat.c coffbase.txt configure configure.in
    makefile.bc Makefile.in makefile.vc nmakehlp.c nmakehlp.exe nmakehlp.obj
    README Release rules.vc tcl.dsp tcl.dsw tcl.hpj.in tcl.m4 tcl.rc
    tclAppInit.c tclConfig.sh.in tclooConfig.sh tclsh.exe.manifest.in
    tclsh.ico tclsh.rc tclWin32Dll.c tclWinChan.c tclWinConsole.c
    tclWinDde.c tclWinError.c tclWinFCmd.c tclWinFile.c tclWinInit.c
    tclWinInt.h tclWinLoad.c tclWinNotify.c tclWinPipe.c tclWinPort.h
    tclWinReg.c tclWinSerial.c tclWinSock.c tclWinTest.c tclWinThrd.c
    tclWinTime.c testlog_tcl-trunk_2014-02-24.txt versions.vc _junk.pch}
    ---- Result should have been (glob matching):
    1 *
    ==== cmdAH-6.4 FAILED
    </verbatim>
    Then, I started the freshly compiled tclsh86.exe and executed command
    by command:
    <verbatim>
    % file volume
    C:/ D:/ E:/ T:/ U:/ X:/ Y:/
    % set volumeList [string tolower [file volumes]]
    c:/ d:/ e:/ t:/ u:/ x:/ y:/
    % set element [lsearch -exact $volumeList "c:/"]
    -1
    % lindex $volumeList 0
    C:/
    % set volumeList
    c:/ d:/ e:/ t:/ u:/ x:/ y:/
    </verbatim>
    IMHO, the list representation was not destroyed and the string is
    tolower but the list still uppercase.
    
  5. foundin changed to: "[29b5d483ec]"
  6. is_private changed to: "0"
  7. login: "oehhar"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "oehhar"
  14. subsystem changed to: "18. Commands M-Z"
  15. title changed to:
    string tolower does not invalidate list representation
    
  16. type changed to: "Bug"