diff options
author | dgp <dgp@users.sourceforge.net> | 2012-11-15 17:55:25 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2012-11-15 17:55:25 (GMT) |
commit | 8a45c3faf392af5c64589268d0d7699c17b7feec (patch) | |
tree | a098b4e6b1d3b2a82e4d807dc53a33244eb57d2b /tests/source.test | |
parent | a06d3694d5af51acabffa650a8aaaa30e199d130 (diff) | |
download | tcl-8a45c3faf392af5c64589268d0d7699c17b7feec.zip tcl-8a45c3faf392af5c64589268d0d7699c17b7feec.tar.gz tcl-8a45c3faf392af5c64589268d0d7699c17b7feec.tar.bz2 |
More complete purge of things only present for supporting long-dead Mac 9 systems.
Diffstat (limited to 'tests/source.test')
-rw-r--r-- | tests/source.test | 104 |
1 files changed, 0 insertions, 104 deletions
diff --git a/tests/source.test b/tests/source.test index 06d6b51..db12707 100644 --- a/tests/source.test +++ b/tests/source.test @@ -204,110 +204,6 @@ test source-3.5 {return with special code etc.} -setup { invoked from within "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. |