diff options
author | dgp <dgp@users.sourceforge.net> | 2007-08-21 20:41:31 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2007-08-21 20:41:31 (GMT) |
commit | 5a6f909bc973a094f28f7cadc81faf84a9128748 (patch) | |
tree | e30018135f4e85fac7c5b364a7f210449f2cd160 /tests | |
parent | 2d087cd971d85e6e4bb484878b61f0ce4d845b6b (diff) | |
download | tcl-5a6f909bc973a094f28f7cadc81faf84a9128748.zip tcl-5a6f909bc973a094f28f7cadc81faf84a9128748.tar.gz tcl-5a6f909bc973a094f28f7cadc81faf84a9128748.tar.bz2 |
* generic/tclMain.c: Corrected the logic of dropping the last
* tests/main.test: newline from an interactively typed command.
[Bug 1775878].
Diffstat (limited to 'tests')
-rw-r--r-- | tests/main.test | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/tests/main.test b/tests/main.test index 7842644..e188f6e 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.20 2006/09/04 21:34:58 dgp Exp $ +# RCS: @(#) $Id: main.test,v 1.21 2007/08/21 20:41:32 dgp Exp $ if {[catch {package require tcltest 2.0.2}]} { puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required." @@ -819,6 +819,20 @@ namespace eval ::tcl::test::main { file delete result } -result "Exit MainLoop\nIn exit\neven 0\n" + test Tcl_Main-5.13 { + Bug 1775878 + } -constraints { + exec + } -setup { + catch {set f [open "|[list [interpreter]]" w+]} + } -body { + type $f "puts \\" + type $f return + list [catch {gets $f} line] $line + } -cleanup { + close $f + } -result [list 0 return] + # Tests Tcl_Main-6.*: interactive operations with prompts test Tcl_Main-6.1 { @@ -1202,6 +1216,21 @@ namespace eval ::tcl::test::main { file delete result } -result "1\nExit MainLoop\n" + test Tcl_Main-8.13 { + Bug 1775878 + } -constraints { + exec Tcltest + } -setup { + catch {set f [open "|[list [interpreter]]" w+]} + } -body { + exec [interpreter] << "testsetmainloop\nputs \\\npwd\ntestexitmainloop" >& result + set f [open result] + read $f + } -cleanup { + close $f + file delete result + } -result "pwd\nExit MainLoop\n" + # Tests Tcl_Main-9.*: Prompt operations test Tcl_Main-9.1 { |