summaryrefslogtreecommitdiffstats
path: root/tests/main.test
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)
commit0a70b2484a2941f3b3eb30e8bd929525b231cc16 (patch)
treed7f1dc91ccc6e259c9e4a334695c1be2406c56ac /tests/main.test
parent95abd51fd7b5108b75ff09404f65795308746f50 (diff)
downloadtcl-0a70b2484a2941f3b3eb30e8bd929525b231cc16.zip
tcl-0a70b2484a2941f3b3eb30e8bd929525b231cc16.tar.gz
tcl-0a70b2484a2941f3b3eb30e8bd929525b231cc16.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/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 {