summaryrefslogtreecommitdiffstats
path: root/tests/main.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-05-05 18:08:56 (GMT)
committerdgp <dgp@noemail.net>2006-05-05 18:08:56 (GMT)
commit59430628657ea9c82fd2ab462660cfe4981cf688 (patch)
treed7f1dc91ccc6e259c9e4a334695c1be2406c56ac /tests/main.test
parentf255dab7581b61b3870b52babe5e5c3895d3d9d9 (diff)
downloadtcl-59430628657ea9c82fd2ab462660cfe4981cf688.zip
tcl-59430628657ea9c82fd2ab462660cfe4981cf688.tar.gz
tcl-59430628657ea9c82fd2ab462660cfe4981cf688.tar.bz2
* generic/tclMain.c (Tcl_Main): Corrected flaw that required
* tests/main.test: (Tcl_Main-4.5): processing of one interactive command before passing control to the loop routine registered with Tcl_SetMainLoop() [Bug 1481986]. FossilOrigin-Name: f4e4abd17fd6355fbea233c0181074455e89066a
Diffstat (limited to 'tests/main.test')
-rw-r--r--tests/main.test23
1 files changed, 22 insertions, 1 deletions
diff --git a/tests/main.test b/tests/main.test
index 26b40eb..4e91478 100644
--- a/tests/main.test
+++ b/tests/main.test
@@ -1,6 +1,6 @@
# This file contains a collection of tests for generic/tclMain.c.
#
-# RCS: @(#) $Id: main.test,v 1.13.2.2 2006/02/09 15:23:52 dgp Exp $
+# RCS: @(#) $Id: main.test,v 1.13.2.3 2006/05/05 18:08:58 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -499,6 +499,27 @@ namespace eval ::tcl::test::main {
} -result "application-specific initialization failed:\
\nIn script\nExit MainLoop\nIn exit\neven 0\n"
+ test Tcl_Main-4.5 {
+ Tcl_Main: Bug 1481986
+ } -constraints {
+ exec Tcltest
+ } -setup {
+ set rc [makeFile {
+ testsetmainloop
+ after 0 {puts "Event callback"}
+ } rc]
+ } -body {
+ set f [open "|[list [interpreter] -appinitprocsetrcfile $rc]" w+]
+ after 1000
+ type $f {puts {Interactive output}
+ exit
+ }
+ read $f
+ } -cleanup {
+ catch {close $f}
+ removeFile rc
+ } -result "Event callback\nInteractive output\n"
+
# Tests Tcl_Main-5.*: interactive operations
test Tcl_Main-5.1 {