1
# Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
3
# This program is free software; you can redistribute it and/or modify
4
# it under the terms of the GNU General Public License as published by
5
# the Free Software Foundation; either version 2 of the License, or
6
# (at your option) any later version.
8
# This program is distributed in the hope that it will be useful,
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
# GNU General Public License for more details.
13
# You should have received a copy of the GNU General Public License
14
# along with this program; if not, write to the Free Software
15
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
17
# Please email any bugs, comments, and/or additions to this file to:
18
# bug-dejagnu@prep.ai.mit.edu
20
# This file was written by Rob Savoye. (rob@cygnus.com)
23
# the initial work on the version of these tests from the tcl release was done
24
# by Mary Ann May-Pumphrey of Sun Microsystems.
30
expect_before buffer_full { error "Buffer full" }
33
set timeoutmsg "Timed out: Never got started, "
36
set command "unidentified test in $file"
38
if ![file exists ${srcdir}/../tests] {
39
perror "The source for the test cases is missing." 0
42
send "cd ${srcdir}/../tests\r"
44
-re "set VERBOSE 1\[\r\n\]*1\[\r\n\]*$eprompt" {
45
verbose "Set verbose flag for tests"
48
-re "cd $srcdir/../tests\[\r\n\]*$eprompt" {
49
verbose "Changed directory to $srcdir/../tests" 2
51
-re "no files matched glob pattern" {
52
warning "Didn't cd to $srcdir/../tests"
55
perror "Couldn't change directories" 0
60
exp_send "source $file\r"
62
-re "source $file\[\r\n\]*$eprompt" {
63
verbose "Sourced test $file ..."
64
set timeoutmsg "Never got to the end of "
67
"install Tcl or set your TCL_LIBRARY environment variable" {
68
perror "You need to set the TCL_LIBRARY environment variable"
71
-re "no files matched glob pattern" {
72
warning "Didn't cd to $srcdir/../tests"
74
-re "\[\r\n\]*\\+\\+\\+\\+ (\[a-z\]*-\[.0-9\]*) PASSED\[\r\n\]*" {
75
pass $expect_out(1,string)
78
-re "\[\r\n\]*\\+* (\[a-z\]*-\[.0-9\]*) FAILED\[\r\n\]*" {
79
fail $expect_out(1,string)
82
-re "Test generated error:\[\r\n\]*.*\[\r\n\]*" {
83
regsub "Test generated error:\[\r\n\]+" $expect_out(0,string) "" tmp
84
regsub -all "\[\r\n\]*\[a-z.\]test\[\r\n\]*" $tmp "" tmp
85
regsub -all "\[\r\n\]*" $tmp "" tmp
86
perror "Got a test case bug \"$tmp\""
89
-re "\[x\]+ \[a-i\]+ \[A-K\]+ \[0-9\]+ " {
90
verbose "Got standard output message from exec 8.1 test." 3
93
"*Error: bad option *" {
94
fail "$command (Got a bad option)"
100
warning "$timeoutmsg $file"