summaryrefslogtreecommitdiffstats
path: root/tests/main.test
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2006-05-05 18:09:46 (GMT)
committerdgp <dgp@noemail.net>2006-05-05 18:09:46 (GMT)
commit034d2eed402efbfb22f068d860d1a3d7b46509f2 (patch)
tree798c410899336ae3a0e0642c314d7af97a06dd75 /tests/main.test
parent2d86a356076e266035bba5fc35f181636d877251 (diff)
downloadtcl-034d2eed402efbfb22f068d860d1a3d7b46509f2.zip
tcl-034d2eed402efbfb22f068d860d1a3d7b46509f2.tar.gz
tcl-034d2eed402efbfb22f068d860d1a3d7b46509f2.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: aedf5e48e961a866afd44b72035cf3e08711d837
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 5eab892..689d9f0 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.18 2006/03/21 11:12:29 dkf Exp $
+# RCS: @(#) $Id: main.test,v 1.19 2006/05/05 18:09:47 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -557,6 +557,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 {