blob: dbc57ecbb8b588072016c7883bc59321786897a5 [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
Ulrich Drepper5d832292005-08-15 21:36:27 +000020
21original=${original:-testfile19}
22indexed=${indexed:-testfile19.index}
23
Roland McGrath1b8b4462005-11-16 01:33:38 +000024testfiles $original $indexed
Ulrich Drepper5d832292005-08-15 21:36:27 +000025
Mark Wielaard86be7922013-04-26 23:44:25 +020026testrun ${abs_top_builddir}/src/ranlib $original
Ulrich Drepper5d832292005-08-15 21:36:27 +000027
28if test -z "$noindex"; then
Ulrich Drepperce0bdb62007-02-05 07:13:52 +000029 # The date in the index is different. The reference file has it blanked
Ulrich Drepper5d832292005-08-15 21:36:27 +000030 # out, we do the same here.
31 echo " " |
32 dd of=$original seek=24 bs=1 count=12 conv=notrunc 2>/dev/null
33fi
34
35cmp $original $indexed
36
Ulrich Drepper5d832292005-08-15 21:36:27 +000037exit 0