mirror of
https://github.com/mirror/make.git
synced 2026-08-10 17:14:33 +00:00
Fix a bug exporting/unexporting multiple variables in one command.
Update the text about reporting bugs.
This commit is contained in:
@@ -25,7 +25,6 @@ BOTZ = botz
|
||||
export BITZ BOTZ
|
||||
unexport BOTZ
|
||||
|
||||
|
||||
ifdef EXPORT_ALL
|
||||
export
|
||||
endif
|
||||
@@ -173,5 +172,79 @@ $answer = "foo=f-ok bar=b-ok\nfoo= bar=\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
# TEST 7: Test exporting multiple variables on the same line
|
||||
|
||||
$makefile4 = &get_tmpfile;
|
||||
|
||||
open(MAKEFILE, "> $makefile4");
|
||||
|
||||
print MAKEFILE <<'EOF';
|
||||
|
||||
A = a
|
||||
B = b
|
||||
C = c
|
||||
D = d
|
||||
E = e
|
||||
F = f
|
||||
G = g
|
||||
H = h
|
||||
I = i
|
||||
J = j
|
||||
|
||||
SOME = A B C
|
||||
|
||||
export F G H I J
|
||||
|
||||
export D E $(SOME)
|
||||
|
||||
all: ; @echo A=$$A B=$$B C=$$C D=$$D E=$$E F=$$F G=$$G H=$$H I=$$I J=$$J
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
&run_make_with_options($makefile4,"",&get_logfile,0);
|
||||
$answer = "A=a B=b C=c D=d E=e F=f G=g H=h I=i J=j\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
|
||||
# TEST 8: Test unexporting multiple variables on the same line
|
||||
|
||||
$makefile5 = &get_tmpfile;
|
||||
|
||||
open(MAKEFILE, "> $makefile5");
|
||||
|
||||
print MAKEFILE <<'EOF';
|
||||
|
||||
A = a
|
||||
B = b
|
||||
C = c
|
||||
D = d
|
||||
E = e
|
||||
F = f
|
||||
G = g
|
||||
H = h
|
||||
I = i
|
||||
J = j
|
||||
|
||||
SOME = A B C
|
||||
|
||||
unexport F G H I J
|
||||
|
||||
unexport D E $(SOME)
|
||||
|
||||
all: ; @echo A=$$A B=$$B C=$$C D=$$D E=$$E F=$$F G=$$G H=$$H I=$$I J=$$J
|
||||
EOF
|
||||
|
||||
close(MAKEFILE);
|
||||
|
||||
@ENV{qw(A B C D E F G H I J)} = qw(1 2 3 4 5 6 7 8 9 10);
|
||||
|
||||
&run_make_with_options($makefile5,"",&get_logfile,0);
|
||||
$answer = "A= B= C= D= E= F= G= H= I= J=\n";
|
||||
&compare_output($answer,&get_logfile(1));
|
||||
|
||||
delete @ENV{qw(A B C D E F G H I J)};
|
||||
|
||||
|
||||
# This tells the test driver that the perl test script executed properly.
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user