summaryrefslogtreecommitdiffstats
path: root/tests/main.test
blob: 49365c36ca8b46d1067a2a3c2524a964bef77170 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# 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.
#
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
# SCCS: @(#) main.test 1.2 97/09/10 17:49:20

if {[info procs test] != "test"} {
    source defs
}

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