# This file contains tests for the tkMain.c file.
#
# This file contains a collection of tests for one or more of the Tcl
# built-in commands.  Sourcing this file into Tcl runs the tests and
# generates output for errors.  No output means no errors were found.
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
# Copyright (c) 1998-1999 by Scriptics Corporation.
# All rights reserved.
#
# RCS: @(#) $Id: main.test,v 1.1.1.1 1999/06/25 17:36:18 damon Exp $

if {[lsearch [namespace children] ::tcltest] == -1} {
    source [file join [pwd] [file dirname [info script]] defs.tcl]
}

test main-1.1 {StdinProc} {unixOnly} {
    catch {removeFile script}
    set fd [open script w]
    puts $fd {
	close stdin; exit
    }
    close $fd
    if {[catch {exec $::tcltest::tktest <script} msg]} {
	set error 1
    } else {
	set error 0
    }
    file delete -force script
    list $error $msg
} {0 {}}

# cleanup
catch {removeFile script}
::tcltest::cleanupTests
return













