diff options
| author | sebres <sebres@users.sourceforge.net> | 2019-09-18 22:58:32 (GMT) |
|---|---|---|
| committer | sebres <sebres@users.sourceforge.net> | 2019-09-18 22:58:32 (GMT) |
| commit | ddd29dbbd30d295df6a6f87ded3fd8b618d957e2 (patch) | |
| tree | 0d2c29c0c8a03a816bb2db3aee562f0ce9d87805 | |
| parent | 63660abb4f8bdea4d69bb947b127815223c39a27 (diff) | |
| download | tcl-ddd29dbbd30d295df6a6f87ded3fd8b618d957e2.zip tcl-ddd29dbbd30d295df6a6f87ded3fd8b618d957e2.tar.gz tcl-ddd29dbbd30d295df6a6f87ded3fd8b618d957e2.tar.bz2 | |
all.tcl: replacement for exit, if calling direct only (avoid rewrite exit if it is inlined or interactive shell)
| -rw-r--r-- | tests/all.tcl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/all.tcl b/tests/all.tcl index 287de1f..52c8763 100644 --- a/tests/all.tcl +++ b/tests/all.tcl @@ -25,4 +25,9 @@ if {[singleProcess]} { set ErrorOnFailures [info exists env(ERROR_ON_FAILURES)] unset -nocomplain env(ERROR_ON_FAILURES) if {[runAllTests] && $ErrorOnFailures} {exit 1} -proc exit args {} +# if calling direct only (avoid rewrite exit if inlined or interactive): +if { [info exists ::argv0] && [file tail $::argv0] eq [file tail [info script]] + && !([info exists ::tcl_interactive] && $::tcl_interactive) +} { + proc exit args {} +}
\ No newline at end of file |
