summaryrefslogtreecommitdiff
path: root/t/test-extensions-empty.sh
blob: 9edc30987c92f2c38327b125fb58fe9f8be7a213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#! /bin/sh
# Copyright (C) 2020-2022 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, see <https://www.gnu.org/licenses/>.

# Empty assignment to TEST_EXTENSIONS should not provoke Perl warning.
# https://bugs.gnu.org/42635

. test-init.sh

cat > configure.ac << 'END'
AC_INIT([foo],[1.0])
AM_INIT_AUTOMAKE([foreign])
AC_PROG_CC  dnl comment this line to make the warning disappear
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END

cat > Makefile.am << 'END'
TEST_EXTENSIONS =
LOG_COMPILER = echo
TESTS = foo.test
END

touch foo.test

autoreconf -fi >reconf.out 2>&1
grep 'uninitialized value' reconf.out && exit 1

# What we're trying to avoid:
# ...
# Use of uninitialized value in string eq at /usr/bin/automake line 4953.
# ...
# nl -ba `command -v automake` | sed -n '4951,4955p'
#  4951            if ($handle_exeext)
#  4952              {
#  4953                unshift (@test_suffixes, $at_exeext)
#  4954                  unless $test_suffixes[0] eq $at_exeext;
#  4955              }

: