# This file contains a top-level script to run all of the tests
# for TclBlend or Jacl. Execute it by invoking "source all" when
# running the tcl.lang.Shell or tclTest in this directory.
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# SCCS: @(#) all 1.12 97/10/16 13:58:19

set javaPkgTests {
    javaCmd.test javaField.test javaInfo.test javaLoad.test javaNull.test
}

if {$tcl_platform(platform) == "java"} {
    # run the Jacl tests

    set tests {
	append.test case.test error.test eval.test expr.test for.test	
	get.test if.test incr.test info.test join.test lindex.test	
	linsert.test list.test llength.test lrange.test lreplace.test
	lsearch.test lsort.test parse.test proc.test split.test string.test
	switch.test trace.test upvar.test while.test invoke.test
    }

    append tests $javaPkgTests

    # (ToDo) can't use glob here because it doesn't work on Windows.
    #
    #append tests [glob -nocomplain java/*.test]
    #append tests [glob -nocomplain common/*.test]

    append tests {
	java/ReflectObject.test common/Invoke.test
    }
} else {
    # run the TclBlend tests

    set tests [glob -nocomplain common/*.test native/*.test]

    append tests $javaPkgTests
}

foreach i [lsort $tests] {
    if [string match l.*.test [file tail $i]] {
	# This is an SCCS lock file;  ignore it.
	continue
    }
    puts stdout $i
    if [catch {source $i} msg] {
	puts $msg
    }	
}
