os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/tests/osa.test
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 # Commands covered:  AppleScript
     2 #
     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.
     6 #
     7 # Copyright (c) 1997 Sun Microsystems, Inc.
     8 # Copyright (c) 1998-1999 by Scriptics Corporation.
     9 #
    10 # See the file "license.terms" for information on usage and redistribution
    11 # of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    12 #
    13 # RCS: @(#) $Id: osa.test,v 1.6 2000/04/10 17:19:02 ericm Exp $
    14 
    15 if {[lsearch [namespace children] ::tcltest] == -1} {
    16     package require tcltest
    17     namespace import -force ::tcltest::*
    18 }
    19 
    20 # Only run the test if we can load the AppleScript command
    21 set ::tcltest::testConstraints(appleScript) [expr {[info commands AppleScript] != ""}]
    22 
    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}}
    29 
    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"}}
    33 
    34 # cleanup
    35 ::tcltest::cleanupTests
    36 return
    37 
    38 
    39 
    40 
    41 
    42 
    43 
    44 
    45 
    46 
    47 
    48