Fix a bug exporting/unexporting multiple variables in one command.

Update the text about reporting bugs.
This commit is contained in:
Paul Smith
2002-09-18 20:51:58 +00:00
parent 76652d5d02
commit ebd05dbeb3
5 changed files with 127 additions and 34 deletions

View File

@@ -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;