summaryrefslogtreecommitdiffstats
path: root/tests/main.test
blob: 17fbaf99e4611d28a03e5c66fd5da12747b47b64 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# 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.7 2003/04/01 21:06:41 dgp Exp $

package require tcltest 2.1
eval tcltest::configure $argv
tcltest::loadTestedCommands

test main-1.1 {StdinProc} {unix} {
    set script [makeFile {
	close stdin; exit
    } script]
    if {[catch {exec [interpreter] <$script} msg]} {
	set error 1
    } else {
	set error 0
    }
    removeFile script
    list $error $msg
} {0 {}}

# cleanup
cleanupTests
return