blob: 0b34cbbb40c688969562512d7c1e885256e3cb7b [file] [log] [blame]
Ulrich Drepper5d832292005-08-15 21:36:27 +00001#! /bin/sh
2# Copyright (C) 2005 Red Hat, Inc.
Mark Wielaardde2ed972012-06-05 17:15:16 +02003# This file is part of elfutils.
Ulrich Drepper5d832292005-08-15 21:36:27 +00004# Written by Ulrich Drepper <drepper@redhat.com>, 2005.
Roland McGrath6d0c2e82006-04-05 00:59:43 +00005#
Mark Wielaardde2ed972012-06-05 17:15:16 +02006# This file is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or
9# (at your option) any later version.
Ulrich Drepper5d832292005-08-15 21:36:27 +000010#
Mark Wielaardde2ed972012-06-05 17:15:16 +020011# elfutils is distributed in the hope that it will be useful, but
Ulrich Drepper361df7d2006-04-04 21:38:57 +000012# WITHOUT ANY WARRANTY; without even the implied warranty of
Mark Wielaardde2ed972012-06-05 17:15:16 +020013# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14# GNU General Public License for more details.
Ulrich Drepper5d832292005-08-15 21:36:27 +000015#
Mark Wielaardde2ed972012-06-05 17:15:16 +020016# You should have received a copy of the GNU General Public License
17# along with this program. If not, see <http://www.gnu.org/licenses/>.
Ulrich Drepper361df7d2006-04-04 21:38:57 +000018
Roland McGrath1b8b4462005-11-16 01:33:38 +000019. $srcdir/test-subr.sh
20
21tempfiles ranlib-test.a ranlib-test.a-copy
Ulrich Drepper5d832292005-08-15 21:36:27 +000022
23cat > ranlib-test.a <<"EOF"
24!<arch>
25foo/ 1124128960 500 500 100664 4 `
26foo
27bar/ 1124128965 500 500 100664 4 `
28bar
29EOF
30
31cp ranlib-test.a ranlib-test.a-copy
32
Mark Wielaard86be7922013-04-26 23:44:25 +020033testrun ${abs_top_builddir}/src/ranlib ranlib-test.a
Ulrich Drepper5d832292005-08-15 21:36:27 +000034
35# The ranlib call should not have changed anything.
36cmp ranlib-test.a ranlib-test.a-copy
37
Ulrich Drepper5d832292005-08-15 21:36:27 +000038exit 0