home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / gnu / binutils-2.2.1 / binutils / testsuite / binutils.all / objdump.exp < prev    next >
Encoding:
Text File  |  1993-05-07  |  1.9 KB  |  55 lines

  1. #   Copyright (C) 1988, 1990, 1991, 1992, 1993 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-dejagnu@prep.ai.mit.edu
  17.  
  18. # This file was written by Rob Savoye. (rob@cygnus.com)
  19.  
  20. load_lib util-defs.exp
  21. # print the version number of objdump
  22. catch "exec $OBJDUMP +version" tmp
  23. regexp " \[0-9\.\]+" $tmp version
  24. clone_output "Version $version of [which $OBJDUMP]"
  25.  
  26. set test_code $objdir/$subdir/bintest
  27. set addr "\[0-9A-Fa-f\]+"
  28.  
  29. #
  30. # setup the list. Here the layout:
  31. # 1st field is the command line option.
  32. # 2nd field is the pattern to match. NOTE - No variable substitutions can be used!
  33. # 3rd field is an optional message to print with PASS/FAIL.
  34. #
  35. set utility [list { "" ".*Usage:.*objdump.*\-ahifdrtxsl.*\-m machine.*\-j section_name.*\.\.\." "No arguments" } \
  36.         { "-i" "BFD header file version.*header little endian, data little endian.*m68k:68020.*a\.out\-i386.*we32k:32000 coff\-we32k" "Show formats" } ]
  37.  
  38. foreach i $utility {
  39.     if [util_test "$OBJDUMP" "$OBJDUMPFLAGS [lindex $i 0]" $test_code [lindex $i 1] [lindex $i 2]] then {
  40.     fail "[lindex $i 2]"
  41.     } else {
  42.     pass "[lindex $i 2]"
  43.     }
  44. }
  45. #
  46. # FIXME: lots more options to test...
  47. #
  48.  
  49.  
  50.  
  51.  
  52.  
  53.