2 # objectlist.test - make sure that a nonexisting objectlist file is properly
3 # mentioned and that the argument may contain spaces.
5 # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
6 # Written by Gary V. Vaughan, 2003
8 # This file is part of GNU Libtool.
10 # GNU Libtool is free software; you can redistribute it and/or
11 # modify it under the terms of the GNU General Public License as
12 # published by the Free Software Foundation; either version 2 of
13 # the License, or (at your option) any later version.
15 # GNU Libtool is distributed in the hope that it will be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with GNU Libtool; see the file COPYING. If not, a copy
22 # can be downloaded from http://www.gnu.org/licenses/gpl.html,
23 # or obtained by writing to the Free Software Foundation, Inc.,
24 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
27 . tests/defs || exit 1
29 # Try a sample link command.
30 linkresult=`$LIBTOOL -n --mode=link $CC -objectlist nonexistant 2>&1`
31 test $? -eq 0 && exit $EXIT_FAILURE
33 echo "$linkresult" | ${EGREP} "nonexistant" >/dev/null 2>&1 && {
34 func_msg "$progname: error message contains -objectlist argument as expected"
35 } || exit $EXIT_FAILURE
38 objlist="object list with spaces"
40 linkresult=`$LIBTOOL -n --mode=link $CC -o a.out -objectlist "$objlist" 2>&1`
43 echo "$linkresult" | ${EGREP} "spaces" >/dev/null 2>&1 && {
44 func_msg "$progname: -objectlist with spaces in filename not recognized."