summaryrefslogtreecommitdiff
path: root/tests/scripts/features
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/features')
-rw-r--r--tests/scripts/features/export75
1 files changed, 74 insertions, 1 deletions
diff --git a/tests/scripts/features/export b/tests/scripts/features/export
index 3d630a4..1690ee8 100644
--- a/tests/scripts/features/export
+++ b/tests/scripts/features/export
@@ -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;