# This file contains a top-level script to run all of the tests
# for Tcl Blend or Jacl. Execute it by invoking "source all" when
# running the tcl.lang.Shell or tclTest in this directory.
#
# Copyright (c) 1997-1998 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.
#
# RCS: @(#) $Id: all,v 1.2 1998/11/04 22:40:48 hylands Exp $

if {$tcl_platform(platform) == "java"} {
    # run the Jacl tests
    eval lappend tests [glob -nocomplain tcljava/*.test jacl/*.test]

    # These are currently the tests that Jacl can pass comfortably.
    # (ToDo) Add others!

    set fileList {append assocd case concat error eval expr 
	fileName for format get 
        if incr info join lindex linsert list llength lrange
	lreplace lsort parse parseOld pkg proc regexp rename scan set split
	string subst trace unknown uplevel upvar while
    }

    foreach file $fileList {
	lappend tests tcl/${file}.test
    }

} else {
    # run the Tcl Blend tests

    set tests [glob -nocomplain tcljava/*.test tclblend/*.test]
}


#foreach i [lsort $tests] 

foreach i $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
    }
}
