summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordas <das>2002-04-08 09:02:00 (GMT)
committerdas <das>2002-04-08 09:02:00 (GMT)
commit0a15882ec2062a8b32ec855925a73e5644108f40 (patch)
tree862099671ae61cb7366e579a4a370691d8ae40fc /tests
parent99e8896f2e7f6cdf266ea20b486a1587ba574dba (diff)
downloadtcl-0a15882ec2062a8b32ec855925a73e5644108f40.zip
tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.gz
tcl-0a15882ec2062a8b32ec855925a73e5644108f40.tar.bz2
2002-04-08 Daniel Steffen <das@users.sourceforge.net>
* generic/tcl.h: no <sys/types.h> on mac. * mac/tclMacFile.c: minor fixes to Vince's changes from 03-24. * mac/tclMacOSA.c: * mac/tclMacResource.c: added missing Tcl_UtfToExternalDString conversions of resource file names. * mac/tclMacSock.c (TcpGetOptionProc): fixed bug introduced by Andreas on 02-25; changed strcmp's to strncmp's so that option comparison behaves like on other platforms. * mac/tcltkMacBuildSupport.sea.hqx (CW Pro6 changes): added support to allow Tk to hookup C library stderr/stdout to TkConsole. * tests/basic.test: * tests/cmdAH.test: * tests/encoding.test: * tests/fileSystem.test: * tests/ioCmd.test: fixed tests failing on mac: check for existence of [exec], changed some result strings.
Diffstat (limited to 'tests')
-rw-r--r--tests/basic.test14
-rw-r--r--tests/cmdAH.test4
-rw-r--r--tests/encoding.test10
-rw-r--r--tests/fileSystem.test4
-rw-r--r--tests/ioCmd.test4
5 files changed, 21 insertions, 15 deletions
diff --git a/tests/basic.test b/tests/basic.test
index 8a3e703..5733b4c 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.18 2002/03/29 21:01:12 dgp Exp $
+# RCS: @(#) $Id: basic.test,v 1.19 2002/04/08 09:02:00 das Exp $
#
if {[lsearch [namespace children] ::tcltest] == -1} {
@@ -29,6 +29,8 @@ set ::tcltest::testConstraints(testcmdtrace) \
[llength [info commands testcmdtrace]]
set ::tcltest::testConstraints(testcreatecommand) \
[llength [info commands testcreatecommand]]
+set ::tcltest::testConstraints(exec) \
+ [llength [info commands exec]]
# This variable needs to be changed when the major or minor version number for
# Tcl changes.
@@ -558,7 +560,7 @@ test basic-44.1 {Tcl_GlobalEval} {emptyTest} {
test basic-45.1 {Tcl_SetRecursionLimit: see interp.test} {emptyTest} {
} {}
-test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {
+test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {exec} {
catch {close $f}
set res [catch {
set f [open |[info nameofexecutable] w+]
@@ -583,7 +585,7 @@ test basic-46.1 {Tcl_AllowExceptions: exception return not allowed} {
DONE
}}
-test basic-46.2 {Tcl_AllowExceptions: exception return not allowed} {
+test basic-46.2 {Tcl_AllowExceptions: exception return not allowed} {exec} {
makeFile {
puts hello
break
@@ -597,7 +599,7 @@ invoked "break" outside of a loop
"break"
(file "BREAKtest" line 3)}}
-test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {
+test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {exec} {
makeFile {
interp alias {} patch {} info patchlevel
patch
@@ -611,7 +613,7 @@ test basic-46.3 {Tcl_AllowExceptions: exception return not allowed} {
"break"
(file "BREAKtest" line 4)}}
-test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {
+test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {exec} {
makeFile {
foo [set a 1] [break]
} BREAKtest
@@ -625,7 +627,7 @@ test basic-46.4 {Tcl_AllowExceptions: exception return not allowed} {
"foo [set a 1] [break]"
(file "BREAKtest" line 2)}}
-test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} {
+test basic-46.5 {Tcl_AllowExceptions: exception return not allowed} {exec} {
makeFile {
return -code return
} BREAKtest
diff --git a/tests/cmdAH.test b/tests/cmdAH.test
index 7c892d5..973ecad 100644
--- a/tests/cmdAH.test
+++ b/tests/cmdAH.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdAH.test,v 1.18 2002/03/24 11:41:50 vincentdarley Exp $
+# RCS: @(#) $Id: cmdAH.test,v 1.19 2002/04/08 09:02:11 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -1502,7 +1502,7 @@ test cmdAH-29.1 {Tcl_FileObjCmd: type} {
test cmdAH-29.2 {Tcl_FileObjCmd: type} {
file type dir.file
} directory
-test cmdAH-29.3.0 {Tcl_FileObjCmd: delete removes link not file} {
+test cmdAH-29.3.0 {Tcl_FileObjCmd: delete removes link not file} {unixOnly nonPortable} {
set exists [list [file exists link.file] [file exists gorp.file]]
file delete link.file
set exists2 [list [file exists link.file] [file exists gorp.file]]
diff --git a/tests/encoding.test b/tests/encoding.test
index 6753833..ef9214e 100644
--- a/tests/encoding.test
+++ b/tests/encoding.test
@@ -8,7 +8,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: encoding.test,v 1.10 2002/03/04 22:00:40 hobbs Exp $
+# RCS: @(#) $Id: encoding.test,v 1.11 2002/04/08 09:02:19 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -28,6 +28,8 @@ proc fromutf {args} {
set ::tcltest::testConstraints(testencoding) \
[expr {[info commands testencoding] != {}}]
+set ::tcltest::testConstraints(exec) \
+ [llength [info commands exec]]
# TclInitEncodingSubsystem is tested by the rest of this file
@@ -361,7 +363,7 @@ test encoding-23.3 {iso2022-jp escape encoding test} {
set data
} [string range $::iso2022uniData 0 49] ; # 0 .. 49 inclusive == 50
-test encoding-24.1 {EscapeFreeProc on open channels} {
+test encoding-24.1 {EscapeFreeProc on open channels} {exec} {
# Bug #524674 input
set f [open iso2022.tcl w]
puts $f {
@@ -373,7 +375,7 @@ test encoding-24.1 {EscapeFreeProc on open channels} {
exec [list $::tcltest::tcltest] iso2022.tcl
} {}
-test encoding-24.2 {EscapeFreeProc on open channels} {
+test encoding-24.2 {EscapeFreeProc on open channels} {exec} {
# Bug #524674 output
set f [open iso2022.tcl w]
puts $f {
@@ -385,7 +387,7 @@ test encoding-24.2 {EscapeFreeProc on open channels} {
viewable [exec [list $::tcltest::tcltest] iso2022.tcl]
} "ab\x1b\$B8C\x1b\$(DD%\x1b(Bg (ab\\u001b\$B8C\\u001b\$(DD%\\u001b(Bg)"
-test encoding-24.3 {EscapeFreeProc on open channels} {
+test encoding-24.3 {EscapeFreeProc on open channels} {exec} {
# Bug #219314 - if we don't free escape encodings correctly on
# channel closure, we go boom
set f [open iso2022.tcl w]
diff --git a/tests/fileSystem.test b/tests/fileSystem.test
index eb0a082..bb1a5a7 100644
--- a/tests/fileSystem.test
+++ b/tests/fileSystem.test
@@ -151,6 +151,7 @@ test filesystem-4.3 {testfilesystem} {
}
test filesystem-5.1 {cache and ~} {
+ -match regexp
-body {
set orig $env(HOME)
set ::env(HOME) /foo/bar/blah
@@ -158,9 +159,10 @@ test filesystem-5.1 {cache and ~} {
set res1 "Parent of ~ (/foo/bar/blah) is [file dirname $testdir]"
set ::env(HOME) /a/b/c
set res2 "Parent of ~ (/a/b/c) is [file dirname $testdir]"
+ set ::env(HOME) $orig
list $res1 $res2
}
- -result {{Parent of ~ (/foo/bar/blah) is /foo/bar} {Parent of ~ (/a/b/c) is /a/b}}
+ -result {{Parent of ~ \(/foo/bar/blah\) is (/foo/bar|foo:bar)} {Parent of ~ \(/a/b/c\) is (/a/b|a:b)}}
}
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index bb05cde..cf7dfbb 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -12,7 +12,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: ioCmd.test,v 1.11 2001/10/12 19:45:24 hobbs Exp $
+# RCS: @(#) $Id: ioCmd.test,v 1.12 2002/04/08 09:02:33 das Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -288,7 +288,7 @@ test iocmd-8.15 {fconfigure command / tcp channel} {socket} {
set r [list [catch {fconfigure $cli -blah} msg] $msg];
iocmdSSHTDWN
set r;
-} {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -peername, or -sockname}}
+} {1 {bad option "-blah": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, -translation, -error, -peername, or -sockname}}
test iocmd-8.16 {fconfigure command / tcp channel} {socket} {
iocmdSSETUP
set r [expr [lindex [fconfigure $cli -peername] 2]==$port];