os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/osa.test
Update contrib.
1 # Commands covered: AppleScript
3 # This file contains a collection of tests for one or more of the Tcl
4 # built-in commands. Sourcing this file into Tcl runs the tests and
5 # generates output for errors. No output means no errors were found.
7 # Copyright (c) 1997 Sun Microsystems, Inc.
8 # Copyright (c) 1998-1999 by Scriptics Corporation.
10 # See the file "license.terms" for information on usage and redistribution
11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
13 # RCS: @(#) $Id: osa.test,v 1.6 2000/04/10 17:19:02 ericm Exp $
15 if {[lsearch [namespace children] ::tcltest] == -1} {
16 package require tcltest
17 namespace import -force ::tcltest::*
20 # Only run the test if we can load the AppleScript command
21 set ::tcltest::testConstraints(appleScript) [expr {[info commands AppleScript] != ""}]
23 test osa-1.1 {Tcl_OSAComponentCmd} {macOnly appleScript} {
24 list [catch AppleScript msg] $msg
25 } {1 {wrong # args: should be "AppleScript option ?arg ...?"}}
26 test osa-1.2 {Tcl_OSAComponentCmd} {macOnly appleScript} {
27 list [catch {AppleScript x} msg] $msg
28 } {1 {bad option "x": should be compile, decompile, delete, execute, info, load, run or store}}
30 test osa-1.3 {TclOSACompileCmd} {macOnly appleScript} {
31 list [catch {AppleScript compile} msg] $msg
32 } {1 {wrong # args: should be "AppleScript compile ?options? code"}}
35 ::tcltest::cleanupTests