Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 672df0df4bedeb23e2d902ef37bd8fa87f125d3b226c23050260286e5d9bb0e1
Ticket: 8413e79232449d82d512edfee22ded5701f683b5
tcltest should not exit an application
User & Date: serhiy.storchaka on 2026-10-20 19:51:17
Changes

  1. foundin changed to: "8.6.18, 9.0.5, 9.1.0"
  2. icomment:
    Still the case on main, 9.0 and 8.6. The <code>exit</code> is there so that <code>wish foo.test</code> does not stay in the event loop after the tests, so simply removing it would change how Tk test files run.
    
    Proposed fix in branch [2052c30735|tcltest-no-exit-when-sourced]: <code>cleanupTests</code> exits only when, in addition, the test file is the main script of the application (<code>&#91;file normalize &#91;info script&#93;&#93; eq &#91;file normalize $::argv0&#93;</code>). An application that sources a test file keeps running. <code>wish foo.test</code> and Tk's <code>all.tcl</code> exit as before. The behaviour is now documented in tcltest.n; new test tcltest-29.1.
    
  3. login: "serhiy.storchaka"
  4. mimetype: "text/x-fossil-wiki"