home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / gdb-4.9 / gdb / testsuite / gdb.t00 / echo.exp < prev    next >
Encoding:
Text File  |  1993-05-12  |  2.0 KB  |  59 lines

  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. # This program is distributed in the hope that it will be useful,
  8. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  10. # GNU General Public License for more details.
  11. # You should have received a copy of the GNU General Public License
  12. # along with this program; if not, write to the Free Software
  13. # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  14.  
  15. # Please email any bugs, comments, and/or additions to this file to:
  16. # bug-gdb@prep.ai.mit.edu
  17.  
  18. # This file was written by Rob Savoye. (rob@cygnus.com)
  19.  
  20. if $tracelevel then {
  21.     strace $tracelevel
  22.     }
  23.  
  24. #
  25. # test the echo command
  26. #
  27.  
  28. # this sets the prms id number.  This is the number that will appear
  29. # on all the output logs.
  30. #    ex: set prms_id 643
  31. set prms_id 0
  32.  
  33. # this sets the bug id id.  This is the number that will appear
  34. # on all the output logs. This is optional and if it is not set
  35. # it will appear on all output logs as a 0.
  36. #    ex: set bug_id 12
  37. set bug_id 0
  38.  
  39. # this sends a string to the stdin of the tool being tested. The string
  40. # should be between the quotes.
  41. send "echo Hello world!\n"
  42.  
  43. # any shell style globbing can be used between the ""
  44. # regular expressions can be used instead by preceding the
  45. # first quote with the option -re
  46. #    ex: "file deleted"    { fail "removed source file" }
  47. # the string between the quotes after a fail or pass is what
  48. # gets printed if the pattern matches. There can be multiple
  49. # send/expect sequences in one test.
  50. expect {
  51.     -re "Hello world.*$prompt $"    { pass "Echo test" }
  52.     -re "$prompt $"            { fail "Echo test" }
  53.     timeout                { fail "(timeout) Echo test" }
  54.     }
  55.  
  56. # this dumps the output to the detailed log for this tool
  57.