summaryrefslogtreecommitdiffstats
path: root/tests/main.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-05-05 18:09:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-05-05 18:09:47 (GMT)
commitc802ec354b63ada12adc6522c9d96b60bd16687a (patch)
tree798c410899336ae3a0e0642c314d7af97a06dd75 /tests/main.test
parent567b7209bf2c1079048fca82605f2f468b9bf66b (diff)
downloadtcl-c802ec354b63ada12adc6522c9d96b60bd16687a.zip
tcl-c802ec354b63ada12adc6522c9d96b60bd16687a.tar.gz
tcl-c802ec354b63ada12adc6522c9d96b60bd16687a.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 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 {