You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2.0 KiB
2.0 KiB
scriptlib/_punktest — test-owned scriptlib fixtures
These scripts are fixtures owned by the punk test suite
(src/tests/shell/testsuites/punkexe/scriptexec.test), not user sample
scripts. They exist so tests can exercise the lib: scriptlib-resolution
mechanism and the script subcommand's Tk main-loop behaviour against
stable, committed scripts rather than user-editable samples.
- Do not hand-edit these files: the tests assert on their exact behaviour and output markers. Changing them will break the suite.
- The rest of
scriptlib/is user-only territory; this_punktest/subfolder is the exception, owned and maintained by the test suite. - They resolve via
<punkexe> script lib:_punktest/<name>(subpath resolution throughpunk::path::scriptlib_resolve).
Fixtures:
echo.tcl— emits a marker plus its::argv0/::argv; used forlib:resolution, subpath resolution, and file-form argument passing.extless— extensionless, first line# tcl; proves extensionless-tcl matching (punk::path 0.3.0 first-line identification).dual/dual.tcl— precedence pair with distinct markers; the spelling matching the call must win (lib:_punktest/dualrunsdual,lib:_punktest/dual.tclrunsdual.tcl).shebang_sh— extensionless, portable sh-trampoline shebang (#!/bin/shwith commentedexec tclshcontinuation); proves the identification check accepts the classic cross-platform idiom.notatcl— extensionless with a python shebang and no.tclsibling; must NOT resolve, and the not-found output must note the identification skip.tk_countdown.tcl <ms>— Tk window that exits 0 from anaftercallback; proves thescriptsubcommand services a registered Tk main loop (the callback runs only if the event loop is serviced).tk_noexit.tcl— Tk window with no explicit exit; used to prove a GUI script stays alive (blocks) underscript, as it does under tclsh/wish.tk_error.tcl— Tk window then an uncaught error; proves an errored GUI script exits promptly (no hanging window).