1#! /bin/sh
2# Copyright (C) 2017 Red Hat, Inc.
3# This file is part of elfutils.
4#
5# This file is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 3 of the License, or
8# (at your option) any later version.
9#
10# elfutils is distributed in the hope that it will be useful, but
11# WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
18. $srcdir/test-subr.sh
19
20# See run-aggregate-size.sh for how to generate testfiles.
21
22testfiles testfile-sizes1.o testfile-sizes2.o testfile-sizes3.o
23
24testrun_compare ${abs_builddir}/peel_type -e testfile-sizes1.o <<\EOF
25c raw type base_type
26i raw type base_type
27l raw type base_type
28v raw type pointer_type
29s raw type structure_type
30ca raw type array_type
31ia raw type array_type
32va raw type array_type
33sa raw type array_type
34EOF
35
36testrun_compare ${abs_builddir}/peel_type -e testfile-sizes2.o <<\EOF
37c raw type base_type
38i raw type base_type
39l raw type base_type
40v raw type pointer_type
41s raw type structure_type
42ca raw type array_type
43ia raw type array_type
44va raw type array_type
45sa raw type array_type
46EOF
47
48testrun_compare ${abs_builddir}/peel_type -e testfile-sizes3.o <<\EOF
49c raw type base_type
50i raw type base_type
51l raw type base_type
52v raw type pointer_type
53s raw type structure_type
54ca raw type array_type
55ia raw type array_type
56va raw type array_type
57sa raw type array_type
58d3d raw type array_type
59f raw type base_type
60b raw type base_type
61EOF
62
63exit 0
64