2023-04-30 13:39:04 +00:00
|
|
|
# -*-perl-*-
|
|
|
|
|
|
|
|
$description = "Test variable expansion.";
|
|
|
|
|
|
|
|
# sv 64124.
|
|
|
|
# Expand a variable whose value exceeds 200 bytes.
|
|
|
|
# 200 is the initial size of variable_buffer.
|
|
|
|
# Value bigger than 200 bytes causes a realloc of variable_buffer.
|
|
|
|
# In this test the variable being expanded is MAKEFLAGS and its value occupies
|
2023-06-19 14:00:11 +00:00
|
|
|
# 12, 600 and 120000 bytes.
|
2023-04-30 13:39:04 +00:00
|
|
|
|
2023-06-19 14:00:11 +00:00
|
|
|
my $s = "hello_world\n";
|
2023-04-30 13:39:04 +00:00
|
|
|
my @mult = (1, 50, 10000);
|
|
|
|
|
|
|
|
for my $m (@mult) {
|
|
|
|
my $answer = $s x $m;
|
|
|
|
$ENV{'MAKEFLAGS'} = " -- hello=$answer";
|
|
|
|
run_make_test(q!
|
|
|
|
$(info x$(hello)y)
|
|
|
|
all:
|
|
|
|
!,
|
|
|
|
'', "x${answer}y\n#MAKE#: Nothing to be done for 'all'.\n");
|
|
|
|
}
|
|
|
|
|
|
|
|
# This tells the test driver that the perl test script executed properly.
|
|
|
|
1;
|