Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3804b42113f75c91976632e970c732cf839e0ef168104fc6e3e68dc2c4829064
Ticket: 5d70d14a092160d19d913d8fa2b36a01e1c3a9b4
tcltest: test result differs for different singleproc values
User & Date: anonymous on 2025-01-11 11:28:45
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    I have a following test (sources encoded as utf-8)
    
    --- all.tcl ---
    package require tcltest
    ::tcltest::runAllTests
    ---------------
    
    --- utf8.test ---
    package require tcltest 2.5
    ::tcltest::test notascii {string corrupted when singleproc == 0} {
        string length "äöü"
    } 3
    -----------------
    
    Test passes in singleproc mode:
    > tclsh all.tcl -singleproc 1
    
    Test fails for default run:
    > tclsh all.tcl
    Test files run in separate interpreters
    Running tests that match:  *
    Skipping test files that match:  l.*.test
    Only running test files that match:  *.test
    Tests began at Sat Jan 11 13:04:12 EET 2025
    utf-8.test
    
    
    ==== notascii string corrupted when singleproc == 0 FAILED
    ==== Contents of test case:
    
        string length "äöü"
    
    ---- Result was:
    6
    ---- Result should have been (exact matching):
    3
    ==== notascii FAILED
    
    Environment:
    
    tcl_platform(byteOrder)     = littleEndian
    tcl_platform(engine)        = Tcl
    tcl_platform(machine)       = amd64
    tcl_platform(os)            = Windows NT
    tcl_platform(osVersion)     = 10.0
    tcl_platform(pathSeparator) = ;
    tcl_platform(platform)      = windows
    tcl_platform(pointerSize)   = 8
    tcl_platform(threaded)      = 1
    tcl_platform(user)          = user
    tcl_platform(wordSize)      = 4
    tcl = 8.6.17
    tcltest = 2.5.9
    
    Problem:
    
    tcltest's runAllTests sources test file as utf-8 for singleProc:
    --- tcltest-2.5.9.tm ---
    ...
    2926: uplevel 1 [list ::source -encoding utf-8 $file]
    ...
    ---
    
    and runAllTests runs test file using system defaults otherwise
    --- tcltest-2.5.9.tm ---
    ...
    2950: set cmd [linsert $childargv 0 | $shell $file]
    ...
    2953: set pipeFd [open $cmd "r"]
    ...
    ---
    
  5. foundin changed to: "8.6.17"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "adbf9acf8babf33ccf30baaf363c2949e21b82be"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "34. tcltest Package"
  15. title changed to:
    tcltest: test result differs for different singleproc values
    
  16. type changed to: "Bug"