summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2002-07-04 16:52:07 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2002-07-04 16:52:07 (GMT)
commit7e3d8312386ae4c63e52d274aadd2695c7390695 (patch)
tree9a3056b7f28977b93f0ce4a8a517616d12866394
parent01bc31d76817656d11d52766fb7f5312117b7f69 (diff)
downloadtcl-7e3d8312386ae4c63e52d274aadd2695c7390695.zip
tcl-7e3d8312386ae4c63e52d274aadd2695c7390695.tar.gz
tcl-7e3d8312386ae4c63e52d274aadd2695c7390695.tar.bz2
fixed [Bug 575817]
-rw-r--r--ChangeLog4
-rw-r--r--tests/basic.test35
2 files changed, 24 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 36e10d7..b45fd10 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-04 Miguel Sofer <msofer@users.sourceforge.net>
+
+ * tests/basic.test: Same issue as below; fixed [Bug 575817]
+
2002-07-04 Andreas Kupries <andreas_kupries@users.sourceforge.net>
* All the bugs below are instances of the same problem: The
diff --git a/tests/basic.test b/tests/basic.test
index 0d80968..61429b3 100644
--- a/tests/basic.test
+++ b/tests/basic.test
@@ -15,7 +15,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: basic.test,v 1.21 2002/06/22 04:19:47 dgp Exp $
+# RCS: @(#) $Id: basic.test,v 1.22 2002/07/04 16:52:07 msofer Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -426,12 +426,13 @@ test basic-26.1 {Tcl_EvalObj: preserve object while evaling it} {
# message.
proc bgerror {args} {set ::x $::errorInfo}
- set f [open test1 w]
+ set fName [makeFile {} test1]
+ set f [open $fName w]
fileevent $f writable "fileevent $f writable {}; error foo"
set x {}
vwait x
close $f
- file delete test1
+ removeFile test1
rename bgerror {}
set x
} "foo\n while executing\n\"error foo\""
@@ -586,12 +587,13 @@ DONE
}}
test basic-46.2 {Tcl_AllowExceptions: exception return not allowed} {exec} {
- makeFile {
+ set fName [makeFile {
puts hello
break
- } BREAKtest
- set res [list [catch {exec [info nameofexecutable] BREAKtest} msg] $msg]
+ } BREAKtest]
+ set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
removeFile BREAKtest
+ regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
} {1 {hello
invoked "break" outside of a loop
@@ -600,13 +602,14 @@ invoked "break" outside of a loop
(file "BREAKtest" line 3)}}
test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {exec} {
- makeFile {
+ set fName [makeFile {
interp alias {} patch {} info patchlevel
patch
break
- } BREAKtest
- set res [list [catch {exec [info nameofexecutable] BREAKtest} msg] $msg]
+ } BREAKtest]
+ set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
removeFile BREAKtest
+ regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
} {1 {invoked "break" outside of a loop
while executing
@@ -614,11 +617,12 @@ test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {exec} {
(file "BREAKtest" line 4)}}
test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {exec} {
- makeFile {
+ set fName [makeFile {
foo [set a 1] [break]
- } BREAKtest
- set res [list [catch {exec [info nameofexecutable] BREAKtest} msg] $msg]
+ } BREAKtest]
+ set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
removeFile BREAKtest
+ regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
} {1 {invoked "break" outside of a loop
while executing
@@ -628,11 +632,12 @@ test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {exec} {
(file "BREAKtest" line 2)}}
test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} {exec} {
- makeFile {
+ set fName [makeFile {
return -code return
- } BREAKtest
- set res [list [catch {exec [info nameofexecutable] BREAKtest} msg] $msg]
+ } BREAKtest]
+ set res [list [catch {exec [info nameofexecutable] $fName} msg] $msg]
removeFile BREAKtest
+ regsub {"[^ ]*BREAKtest"} $res {"BREAKtest"} res
set res
} {1 {command returned bad code: 2
while executing