source: trunk/src/binutils/libiberty/testsuite/regress-demangle@ 10

Last change on this file since 10 was 10, checked in by bird, 23 years ago

Initial revision

  • Property cvs2svn:cvs-rev set to 1.1
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 594 bytes
Line 
1#! /bin/sh
2
3# Run a regression test for the demangler.
4# Usage: regress-demangle TEST-FILE
5
6failures=0
7count=0
8sed -e '/^#/ d' "$1" | (
9 while read type; do
10 read mangled
11 read demangled
12
13 x="`echo $mangled | ./test-filter $type`"
14 count=`expr $count + 1`
15 if test "x$x" != "x$demangled"; then
16 failures=`expr $failures + 1`
17 echo "FAIL: $type $mangled"
18 echo " result: $x"
19 echo " expected: $demangled"
20 fi
21 done
22
23 if test $failures -eq 0; then
24 echo "All $count tests passed"
25 else
26 echo "$failures of $count tests failed"
27 fi
28
29 test $failures -eq 0
30)
Note: See TracBrowser for help on using the repository browser.