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-gdb@prep.ai.mit.edu
20 # This file was written by Rob Savoye. (rob@cygnus.com)
26 # This only works for native, I think.
28 warning "Term test case can't run on a target system."
33 # test running programs
40 if ![file exists $objdir/$subdir/$binfile] then {
41 perror "$objdir/$subdir/$binfile does not exist."
45 gdb_reinitialize_dir $srcdir/$subdir
46 gdb_load $objdir/$subdir/$binfile
48 # Test that GDB correctly identifies that it does not control a terminal.
49 send "info terminal\n"
51 -re "No saved terminal information..*$prompt $"\
54 -re "Starting program.*$binfile.*120.*Program exited normally..*$prompt $"\
55 { send "info terminal\n"
57 -re "No saved terminal information..*$prompt $"\
58 { pass "info terminal" }
59 -re ".*$prompt $" { fail "info terminal" }
60 timeout { fail "(timeout) info terminal" }
63 -re ".*$prompt $" { fail "info terminal" }
64 timeout { fail "(timeout) info terminal" }
67 -re ".*$prompt $" { fail "info terminal" }
68 timeout { fail "(timeout) info terminal" }
75 -re "Breakpoint.*at.* file .*, line.*$prompt $"\
78 -re "Starting program.*Breakpoint \[0-9\]+,.*main.*if .argc != 2.*$prompt $"\
79 { send "info terminal\n"
81 -re "Inferior's terminal status .currently saved by GDB.:.*$prompt $"\
82 { pass "info terminal at breakpoint" }
83 -re ".*$prompt $" { fail "info terminal at breakpoint" }
84 timeout { fail "(timeout) info terminal at breakpoint" }
87 -re ".*$prompt $" { fail "info terminal at breakpoint" }
88 timeout { fail "(timeout) info terminal at breakpoint" }
91 -re ".*$prompt $" { fail "info terminal at breakpoint" }
92 timeout { fail "(timeout) info terminal at breakpoint" }