summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-05-05 18:08:57 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-05-05 18:08:57 (GMT)
commit82e129d538e7f12884fd84a09f42f50104753ef9 (patch)
treed7f1dc91ccc6e259c9e4a334695c1be2406c56ac /tests
parent80d7896f7c04fc2a17eb20d63c70e2f4b4040de8 (diff)
downloadtcl-82e129d538e7f12884fd84a09f42f50104753ef9.zip
tcl-82e129d538e7f12884fd84a09f42f50104753ef9.tar.gz
tcl-82e129d538e7f12884fd84a09f42f50104753ef9.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].
Diffstat (limited to 'tests')
-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 {