summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordas <das>2002-01-27 11:09:19 (GMT)
committerdas <das>2002-01-27 11:09:19 (GMT)
commit22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b (patch)
tree8f740075fb62f904aa60a596cb07aebb02849a6f /tests
parent107d41756017e763fb66994fb0ba6072b20a7d2b (diff)
downloadtcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.zip
tcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.tar.gz
tcl-22bb660bc6f7ab06cef0629d9f88a231ce5d2b7b.tar.bz2
* generic/tclInt.decls:
* generic/tclIntPlatDecls.h: * mac/tclMacChan.c: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacLoad.c: * mac/tclMacResource.c: * mac/tclMacSock.c: TIP 27 CONSTification induced changes * tests/event.test: * tests/main.test: added catches/constraints to test that use features that don't exist on the mac.
Diffstat (limited to 'tests')
-rw-r--r--tests/event.test6
-rw-r--r--tests/main.test28
2 files changed, 18 insertions, 16 deletions
diff --git a/tests/event.test b/tests/event.test
index ce9e34d..2afd33e 100644
--- a/tests/event.test
+++ b/tests/event.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: event.test,v 1.14 2001/12/10 20:30:13 msofer Exp $
+# RCS: @(#) $Id: event.test,v 1.15 2002/01/27 11:09:23 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -276,7 +276,9 @@ test event-7.4 {tkerror is nothing special anymore to tcl} {
set errRes
} bg:err1
-test event-7.5 {correct behaviour when there is no bgerror [Bug 219142]} {
+testConstraint exec [llength [info commands exec]]
+
+test event-7.5 {correct behaviour when there is no bgerror [Bug 219142]} {exec} {
set script {
after 1000 error hello
after 2000 set a 0
diff --git a/tests/main.test b/tests/main.test
index 18d3ea3..d1d5196 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.3 2002/01/09 19:03:34 dgp Exp $
+# RCS: @(#) $Id: main.test,v 1.4 2002/01/27 11:09:26 das Exp $
if {[catch {package require tcltest 2}]} {
puts stderr "Skipping tests in [info script]. tcltest v2 needed."
@@ -46,7 +46,7 @@ namespace eval ::tcl::main::test {
Tcl_Main: startup script - normal
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} script
- set f [open "|[interpreter] script" r]
+ catch {set f [open "|[interpreter] script" r]}
} -body {
read $f
} -cleanup {
@@ -58,7 +58,7 @@ namespace eval ::tcl::main::test {
Tcl_Main: startup script - can't begin with '-'
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} -script
- set f [open "|[interpreter] -script" w+]
+ catch {set f [open "|[interpreter] -script" w+]}
} -body {
puts $f {puts [list $argv0 $argv $tcl_interactive]; exit}
flush $f
@@ -73,7 +73,7 @@ namespace eval ::tcl::main::test {
Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} script
- set f [open "|[interpreter] script \u00c0" r]
+ catch {set f [open "|[interpreter] script \u00c0" r]}
} -body {
read $f
} -cleanup {
@@ -87,7 +87,7 @@ namespace eval ::tcl::main::test {
Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} script
- set f [open "|[interpreter] script \u20ac" r]
+ catch {set f [open "|[interpreter] script \u20ac" r]}
} -body {
read $f
} -cleanup {
@@ -101,7 +101,7 @@ namespace eval ::tcl::main::test {
Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} \u00c0
- set f [open "|[interpreter] \u00c0" r]
+ catch {set f [open "|[interpreter] \u00c0" r]}
} -body {
read $f
} -cleanup {
@@ -115,7 +115,7 @@ namespace eval ::tcl::main::test {
Note the shortcoming explained in Tcl Patch 491789
} -constraints [list exec] -setup {
makeFile {puts [list $argv0 $argv $tcl_interactive]} \u20ac
- set f [open "|[interpreter] \u20ac" r]
+ catch {set f [open "|[interpreter] \u20ac" r]}
} -body {
read $f
} -cleanup {
@@ -462,7 +462,7 @@ namespace eval ::tcl::main::test {
test Tcl_Main-5.2 {
Tcl_Main able to handle non-blocking stdin
} -constraints [list exec] -setup {
- set f [open "|[interpreter]" w+]
+ catch {set f [open "|[interpreter]" w+]}
} -body {
type $f {
fconfigure stdin -blocking 0
@@ -476,8 +476,8 @@ namespace eval ::tcl::main::test {
test Tcl_Main-5.3 {
Tcl_Main handles stdin EOF in mid-command
} -constraints [list exec] -setup {
- set f [open "|[interpreter]" w+]
- fconfigure $f -blocking 0
+ catch {set f [open "|[interpreter]" w+]}
+ catch {fconfigure $f -blocking 0}
} -body {
type $f "fconfigure stdin -eofchar \\032
if 1 \{\n\032"
@@ -499,8 +499,8 @@ namespace eval ::tcl::main::test {
Tcl_Main handles stdin EOF in mid-command
} -constraints [list exec] -setup {
set cmd {makeFile "if 1 \{" script}
- set f [open "|[interpreter] < [eval $cmd]" r]
- fconfigure $f -blocking 0
+ catch {set f [open "|[interpreter] < [eval $cmd]" r]}
+ catch {fconfigure $f -blocking 0}
} -body {
variable wait
fileevent $f readable \
@@ -604,8 +604,8 @@ namespace eval ::tcl::main::test {
test Tcl_Main-5.10 {
Tcl_Main: exit main loop in mid-interactive command
} -constraints [list exec Tcltest] -setup {
- set f [open "|[interpreter]" w+]
- fconfigure $f -blocking 0
+ catch {set f [open "|[interpreter]" w+]}
+ catch {fconfigure $f -blocking 0}
} -body {
type $f "testsetmainloop
after 2000 testexitmainloop