summaryrefslogtreecommitdiffstats
path: root/tests/cmdMZ.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2003-09-05 21:52:11 (GMT)
committerdgp <dgp@users.sourceforge.net>2003-09-05 21:52:11 (GMT)
commitc024a2de4b3868a69fd48901c50a0beedb49ed9d (patch)
treed3430b36c25b01800aa40d815fadb9629ef33770 /tests/cmdMZ.test
parent4383bd1bfc3daa1d69ddcb095a35c5e723f1ba6b (diff)
downloadtcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.zip
tcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.tar.gz
tcl-c024a2de4b3868a69fd48901c50a0beedb49ed9d.tar.bz2
* doc/FileSystem.3: Implementation of
* doc/source.n: TIPs 137/151. Adds * doc/tclsh.1: a -encoding option to * generic/tcl.decls: the [source] command * generic/tclCmdMZ.c (Tcl_SourceObjCmd): and a new C routine, * generic/tclIOUtil.c (Tcl_FSEvalFileEx): Tcl_FSEvalFileEx(), * generic/tclMain.c (Tcl_Main): that provides C access * mac/tclMacResource.c (Tcl_MacSourceObjCmd): to the same function. * tests/cmdMZ.test: Also adds command line * tests/main.test: option handling in Tcl_Main() so that tclsh * tests/source.test: and other apps built on Tcl_Main() respect a -encoding command line option before a script filename. Docs and tests updated as well. [Patch 742683] This is a ***POTENTIAL INCOMPATIBILITY*** only for those C programs that embed Tcl, build on Tcl_Main(), and make use of Tcl_Main's former ability to pass a leading "-encoding" option to interactive shell operations. * generic/tclInt.decls: Added internal stub * generic/tclMain.c (Tcl*StartupScript*): table entries for two new functions Tcl_SetStartupScript() and Tcl_GetStartupScript() that set/get the path and encoding for the startup script to be evaluated by either Tcl_Main() or Tk_Main(). Given public names in anticipation of their exposure by a followup TIP. * generic/tclDecls.h: make genstubs * generic/tclIntDecls.h: * generic/tclStubInit.c:
Diffstat (limited to 'tests/cmdMZ.test')
-rw-r--r--tests/cmdMZ.test15
1 files changed, 10 insertions, 5 deletions
diff --git a/tests/cmdMZ.test b/tests/cmdMZ.test
index 4609365..2e2a978 100644
--- a/tests/cmdMZ.test
+++ b/tests/cmdMZ.test
@@ -11,7 +11,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: cmdMZ.test,v 1.17 2003/08/29 17:43:24 dgp Exp $
+# RCS: @(#) $Id: cmdMZ.test,v 1.18 2003/09/05 21:52:12 dgp Exp $
if {[catch {package require tcltest 2.0.2}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.0.2 required."
@@ -187,6 +187,7 @@ foreach script {
# The tests for Tcl_ScanObjCmd are in scan.test
# Tcl_SourceObjCmd
+# More tests of Tcl_SourceObjCmd are in source.test
test cmdMZ-3.1 {Tcl_SourceObjCmd: error conditions} {macOnly} {
list [catch {source} msg] $msg
@@ -194,12 +195,16 @@ test cmdMZ-3.1 {Tcl_SourceObjCmd: error conditions} {macOnly} {
test cmdMZ-3.2 {Tcl_SourceObjCmd: error conditions} {macOnly} {
list [catch {source a b} msg] $msg
} {1 {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?"}}
-test cmdMZ-3.3 {Tcl_SourceObjCmd: error conditions} {unixOrPc} {
+test cmdMZ-3.3 {Tcl_SourceObjCmd: error conditions} -constraints {
+ unixOrPc
+} -body {
list [catch {source} msg] $msg
-} {1 {wrong # args: should be "source fileName"}}
-test cmdMZ-3.4 {Tcl_SourceObjCmd: error conditions} {unixOrPc} {
+} -match glob -result {1 {wrong # args: should be "source*fileName"}}
+test cmdMZ-3.4 {Tcl_SourceObjCmd: error conditions} -constraints {
+ unixOrPc
+} -body {
list [catch {source a b} msg] $msg
-} {1 {wrong # args: should be "source fileName"}}
+} -match glob -result {1 {wrong # args: should be "source*fileName"}}
test cmdMZ-3.5 {Tcl_SourceObjCmd: error in script} -body {
set file [makeFile {
set x 146