Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / ltdl-api.at
1 # ltdl-api.at -- test libltdl API                -*- Autotest -*-
2 #
3 #   Copyright (C) 2008 Free Software Foundation, Inc.
4 #   Written by Ralf Wildenhues, 2008.
5 #
6 #   This file is part of GNU Libtool.
7 #
8 # GNU Libtool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
12 #
13 # GNU Libtool is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Libtool; see the file COPYING.  If not, a copy
20 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
21 # or obtained by writing to the Free Software Foundation, Inc.,
22 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ####
24
25 AT_SETUP([ltdl API])
26 AT_KEYWORDS([libltdl])
27
28 # Ensure that no symbols from argz are unrenamed.
29 eval `$LIBTOOL --config | $EGREP '^(NM|global_symbol_pipe|objext)='`
30 argz_o=$abs_top_builddir/libltdl/argz.$objext
31 AT_CHECK([test -f "$argz_o" || exit 77])
32 AT_CHECK([eval "$NM \"\$argz_o\" | $global_symbol_pipe"],
33          [], [stdout], [ignore])
34 # Check for global symbols beginning with "argz_"
35 AT_CHECK([grep "^T argz_" stdout], [1])
36 # and also for the _ prefixed version "_argz_"
37 AT_CHECK([grep "^T _argz_" stdout], [1])
38
39 AT_CLEANUP