os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/osa.test
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/osa.test	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,48 @@
     1.4 +# Commands covered:  AppleScript
     1.5 +#
     1.6 +# This file contains a collection of tests for one or more of the Tcl
     1.7 +# built-in commands.  Sourcing this file into Tcl runs the tests and
     1.8 +# generates output for errors.  No output means no errors were found.
     1.9 +#
    1.10 +# Copyright (c) 1997 Sun Microsystems, Inc.
    1.11 +# Copyright (c) 1998-1999 by Scriptics Corporation.
    1.12 +#
    1.13 +# See the file "license.terms" for information on usage and redistribution
    1.14 +# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    1.15 +#
    1.16 +# RCS: @(#) $Id: osa.test,v 1.6 2000/04/10 17:19:02 ericm Exp $
    1.17 +
    1.18 +if {[lsearch [namespace children] ::tcltest] == -1} {
    1.19 +    package require tcltest
    1.20 +    namespace import -force ::tcltest::*
    1.21 +}
    1.22 +
    1.23 +# Only run the test if we can load the AppleScript command
    1.24 +set ::tcltest::testConstraints(appleScript) [expr {[info commands AppleScript] != ""}]
    1.25 +
    1.26 +test osa-1.1 {Tcl_OSAComponentCmd} {macOnly appleScript} {
    1.27 +    list [catch AppleScript msg] $msg
    1.28 +} {1 {wrong # args: should be "AppleScript option ?arg ...?"}}
    1.29 +test osa-1.2 {Tcl_OSAComponentCmd} {macOnly appleScript} {
    1.30 +    list [catch {AppleScript x} msg] $msg
    1.31 +} {1 {bad option "x": should be compile, decompile, delete, execute, info, load, run or store}}
    1.32 +
    1.33 +test osa-1.3 {TclOSACompileCmd} {macOnly appleScript} {
    1.34 +    list [catch {AppleScript compile} msg] $msg
    1.35 +} {1 {wrong # args: should be "AppleScript compile ?options? code"}}
    1.36 +
    1.37 +# cleanup
    1.38 +::tcltest::cleanupTests
    1.39 +return
    1.40 +
    1.41 +
    1.42 +
    1.43 +
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48 +
    1.49 +
    1.50 +
    1.51 +