summaryrefslogtreecommitdiffstats
path: root/tests/source.test
diff options
context:
space:
mode:
authordas <das>2004-03-17 18:14:11 (GMT)
committerdas <das>2004-03-17 18:14:11 (GMT)
commit0205867a3dad7204c57477b6c38c52b981af36e1 (patch)
treeb40c5ed765d71e7cb68ba178c3f3a098638c9987 /tests/source.test
parentb07cf17d9c57bb355e84b17470235902854c7d40 (diff)
downloadtcl-0205867a3dad7204c57477b6c38c52b981af36e1.zip
tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.gz
tcl-0205867a3dad7204c57477b6c38c52b981af36e1.tar.bz2
Removed support for Mac OS Classic platform [Patch 918142]
Diffstat (limited to 'tests/source.test')
-rw-r--r--tests/source.test105
1 files changed, 1 insertions, 104 deletions
diff --git a/tests/source.test b/tests/source.test
index ce2e87c..1d64034 100644
--- a/tests/source.test
+++ b/tests/source.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: source.test,v 1.11 2004/02/25 23:56:59 dgp Exp $
+# RCS: @(#) $Id: source.test,v 1.12 2004/03/17 18:14:18 das Exp $
if {[catch {package require tcltest 2.1}]} {
puts stderr "Skipping tests in [info script]. tcltest 2.1 required."
@@ -192,109 +192,6 @@ test source-3.5 {return with special code etc.} -setup {
"source $sourcefile"} {a b c}}
-# Test for the Macintosh specfic features of the source command
-test source-4.1 {source error conditions} -constraints macOnly -body {
- source -rsrc _no_exist_
-} -result {The resource "_no_exist_" could not be loaded from application.} \
- -returnCodes error
-
-test source-4.2 {source error conditions} -constraints macOnly -body {
- source -rsrcid bad_id
-} -returnCodes error -result {expected integer but got "bad_id"}
-
-test source-4.3 {source error conditions} -constraints macOnly -body {
- source -rsrc rsrcName fileName extra
-} -returnCodes error -result {wrong # args: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-test source-4.4 {source error conditions} -constraints macOnly -body {
- source non_switch rsrcName
-} -returnCodes error -result {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-test source-4.5 {source error conditions} -constraints macOnly -body {
- source -bad_switch argument
-} -returnCodes error -result {bad argument: should be "source fileName" or "source -rsrc name ?fileName?" or "source -rsrcid id ?fileName?" or "source -encoding name fileName"}
-
-
-testConstraint testWriteTextResource \
- [llength [info commands testWriteTextResource]]
-
-test source-5.1 {source resource files} -constraints macOnly -setup {
- set sourcefile [makeFile {} bad_file]
- removeFile bad_file
-} -body {
- source -rsrc rsrcName $sourcefile
-} -returnCodes error -match glob -result {Error finding the file: "*bad_file".}
-
-test source-5.2 {source resource files} -constraints macOnly -setup {
- set sourcefile [makeFile {return} source.file]
-} -body {
- source -rsrc rsrcName $sourcefile
-} -cleanup {
- removeFile source.file
-} -returnCodes error -match glob \
- -result {Error reading the file: "*source.file".}
-
-test source-5.3 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrc rsrcName -file $rsrc.file {set msg2 ok; return}
-} -body {
- set result [catch {source -rsrc rsrcName rsrc.file} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list ok 0 {}]
-
-test source-5.4 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrsFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrc fileRsrcName \
- -file $rsrcFile {set msg2 ok; return}
-} -body {
- source -rsrc fileRsrcName $rsrcFile
- set result [catch {source -rsrc fileRsrcName} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list ok 1 {The resource "fileRsrcName" could not be loaded from application.}]
-
-test source-5.5 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrcid 200 \
- -file $rsrcFile {set msg2 hello; set msg3 bye}
-} -body {
- set result [catch {source -rsrcid 200 $rsrcFile} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list hello 0 bye]
-
-test source-5.6 {source resource files} -constraints {
- macOnly testWriteTextResource
-} -setup {
- set msg2 unset
- set rsrcFile [makeFile {} rsrc.file]
- removeFile rsrc.file
- testWriteTextResource -rsrcid 200 \
- -file $rsrcFile {set msg2 hello; error bad; set msg3 bye}
-} -body {
- set result [catch {source -rsrcid 200 rsrc.file} msg]
- list $msg2 $result $msg
-} -cleanup {
- removeFile rsrc.file
-} -result [list hello 1 bad]
-
-
test source-6.1 {source is binary ok} -setup {
# Note [makeFile] writes in the system encoding.
# [source] defaults to reading in the system encoding.