libtool/tests/functests.at
Peter O'Gorman 6408a706d7 * config/ltmain.m4sh (func_extract_archives) [darwin]: This didn't
actually work on a real fat archive, should do now.
* tests/functests.at [darwin]: remove darwin fat tests which
did not actually work.
2005-02-21 13:47:45 +00:00

66 lines
1.8 KiB
Plaintext

# Hand crafted tests for GNU Libtool. -*- Autotest -*-
# Copyright 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
AT_BANNER([Libtool's shell function tests.])
AT_SETUP([func_extract_archives tests])
sed -n -e '/^# TEST SUITE MARKER ## BEGIN SOURCABLE$/,/^# TEST SUITE MARKER ## NON-FUNCTION$/p' < ${abs_top_builddir}/libtool > ltdefs
AT_DATA(func_extract_archives,
[[#! /bin/sh
# func_extract_archives
. ./ltdefs
SED=${SED-sed}
Xsed="$SED -e s/^X//"
progname=libtool
mode=testing
for afile in baz foobar foobaz
do
echo "$afile" > $afile.o
ar -q libfoo.a $afile.o
rm -f $afile.o
done
for anum in 1 2 3 4 5 6 7 8 9 10 11 12
do
echo "foo $anum" > foo.o
echo "bar $anum" > bar.o
ar -q libfoo.a foo.o bar.o
done
test -d .libs || mkdir .libs
func_extract_archives ".libs/libfoo" "libfoo.a"
for anum in 1 2 3 4 5 6 7 8 9 10 11 12
do
test -f ".libs/libfoo/libfoo.a/foo-$anum.o" || exit 1
$EGREP -v "foo-$anum" ".libs/libfoo/libfoo.a/foo-$anum.o" || exit 1
rm -f ".libs/libfoo/libfoo.a/foo-$anum.o"
done
rm -rf ".libs/libfoo"
exit 0
]])
chmod +x func_extract_archives
AT_CHECK([./func_extract_archives],[0],[ignore],[ignore])
AT_CLEANUP