# This file contains a top-level script to run all of the Tcl
# tests.  Execute it by invoking "source all" when running tclTest
# in this directory.
#
# SCCS: @(#) all 1.18 96/12/17 17:03:48

switch $tcl_platform(platform) {
    "windows" {
	# Tests that cause tk to crash under windows.
	set crash {winfo.test canvRect.test}

	# Tests that fail under windows.

	set fail { entry.test grid.test image.test \
		imgPPM.test menubut.test pack.test scale.test \
		scrollbar.test text.test textDisp.test textImage.test \
		textTag.test textWind.test visual.test winbutton.test }

	if {! [info exist exclude] } {
	    set exclude [string tolower "$crash $fail"]
	}
    }
    "macintosh" {
	set x [pwd]
	cd $tk_library
	set tk_library [pwd]
	cd $x
	
	# Tests that cause tk to crash under mac.
	set crash {}

	# Tests that fail under mac.
	set fail {bind.test entry.test focus.test imgPhoto.test \
	imgPPM.test scale.test send.test text.test textDisp.test \
	textTag.test textWind.test winfo.test}
	
	set exclude [string tolower "$crash $fail"]
    }    
    "unix" {
	set exclude ""
    }
}

foreach i [lsort [glob *.test]] {
    if [string match l.*.test $i] {
	# This is an SCCS lock file;  ignore it.
	continue
    }
    if [lsearch $exclude [string tolower $i]]>=0 {
	# Do not source this file; it exercises a known bug at this time.
	puts stdout "Skipping $i"
	continue
    }
    puts stdout $i
    source $i
}
