This commit was generated by cvs2svn to track changes on a CVS vendor
[external/binutils.git] / gdb / testsuite / gdb.base / echo.exp
1 #   Copyright (C) 1988, 1990, 1991, 1992 Free Software Foundation, Inc.
2
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.
7
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.
12
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.  */
16
17 # Please email any bugs, comments, and/or additions to this file to:
18 # bug-gdb@prep.ai.mit.edu
19
20 # This file was written by Rob Savoye. (rob@cygnus.com)
21
22 if $tracelevel then {
23         strace $tracelevel
24         }
25
26 #
27 # test the echo command
28 #
29
30 # this sets the prms id number.  This is the number that will appear
31 # on all the output logs.
32 #       ex: set prms_id 643
33 set prms_id 0
34
35 # this sets the bug id id.  This is the number that will appear
36 # on all the output logs. This is optional and if it is not set
37 # it will appear on all output logs as a 0.
38 #       ex: set bug_id 12
39 set bug_id 0
40
41 # this sends a string to the stdin of the tool being tested. The string
42 # should be between the quotes.
43 send "echo Hello world!\n"
44
45 # any shell style globbing can be used between the ""
46 # regular expressions can be used instead by preceding the
47 # first quote with the option -re
48 #       ex: "file deleted"      { fail "removed source file" }
49 # the string between the quotes after a fail or pass is what
50 # gets printed if the pattern matches. There can be multiple
51 # send/expect sequences in one test.
52 expect {
53         -re "Hello world.*$prompt $"    { pass "Echo test" }
54         -re "$prompt $"                 { fail "Echo test" }
55         timeout                         { fail "(timeout) Echo test" }
56         }
57
58 # this dumps the output to the detailed log for this tool