]> git.draconx.ca Git - cdecl99.git/blob - tests/general.at
Begin converting testsuite to Autotest.
[cdecl99.git] / tests / general.at
1 # Copyright © 2012, 2020 Nick Bowler
2 #
3 # This program is free software: you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation, either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
15
16 m4_define([LIBTOOL_VARS],
17   [eval `sed -n[]m4_foreach([var], m4_cdr($@), [ -e '/^var='/p]) <$1`])
18
19 dnl Verify that all symbols in the static library are properly prefixed.
20 AT_SETUP([libcdecl static symbol prefixes])
21
22 AT_CHECK([{ $LIBTOOL --config || exit 99; } >libtool.cfg])
23 LIBTOOL_VARS([libtool.cfg], [objdir], [build_old_libs])
24 AT_SKIP_IF([test x"$build_old_libs" = x"no"])
25
26 LIBTOOL_VARS([$builddir/libcdecl.la], [old_library])
27 archive="$builddir/$objdir/$old_library"
28 AT_CHECK([$SHELL "$builddir/exported.sh" "$archive" || exit 99], [0], [stdout])
29 AT_CHECK([sed '/^cdecl_/d' stdout])
30
31 AT_CLEANUP