summaryrefslogtreecommitdiff
path: root/tests/scripts/functions/call
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/functions/call')
-rw-r--r--tests/scripts/functions/call11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/scripts/functions/call b/tests/scripts/functions/call
index 6dd48b1..98f1d92 100644
--- a/tests/scripts/functions/call
+++ b/tests/scripts/functions/call
@@ -96,4 +96,15 @@ close(MAKEFILE);
$answer = "1 2 3 4 5 6 7 8 9\n1 2 3 4 5\n1 2 3\n1 2 3\n";
&compare_output($answer,&get_logfile(1));
+# Ensure that variables are defined in global scope even in a $(call ...)
+
+delete $ENV{X123};
+
+run_make_test('
+tst = $(eval export X123)
+$(call tst)
+all: ; @echo "$${X123-not set}"
+',
+ '', "\n");
+
1;