summaryrefslogtreecommitdiff
path: root/tests/scripts/functions/foreach
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-03-10 02:20:45 +0000
committerPaul Smith <psmith@gnu.org>2006-03-10 02:20:45 +0000
commit6d8d9b74d9c50cb07fe952ac0929f618e4280a55 (patch)
tree2ba40ec88c9a4f3445fbc8f6dc6a3de7760ac604 /tests/scripts/functions/foreach
parentafc4906acaeb7191e4ec085d7be4ca5b036b821d (diff)
downloadgunmake-6d8d9b74d9c50cb07fe952ac0929f618e4280a55.tar.gz
Numerous updates to tests for issues found on Cygwin and Windows.
Revert a fix for $? including non-existent files as it shows a bug in the Linux kernel build. Give them a release to fix this. Add some changes from Eli Z. for Windows changes.
Diffstat (limited to 'tests/scripts/functions/foreach')
-rw-r--r--tests/scripts/functions/foreach18
1 files changed, 7 insertions, 11 deletions
diff --git a/tests/scripts/functions/foreach b/tests/scripts/functions/foreach
index 904c160..9d1c464 100644
--- a/tests/scripts/functions/foreach
+++ b/tests/scripts/functions/foreach
@@ -1,10 +1,7 @@
# -*-perl-*-
+# $Id$
-# Updated 16 June 1993 variable "MAKE" is default was environment override
-# For make 3.63 and above
-
-$description = "The following test creates a makefile to verify
-test the foreach function.";
+$description = "Test the foreach function.";
$details = "This is a test of the foreach function in gnu make.
This function starts with a space separated list of
@@ -16,14 +13,12 @@ types of foreach loops are tested\n";
# TEST 0
-# On WIN32 systems, the user's path is found in %Path% ($Path)
-#
-$pathvar = (($port_type eq 'Windows') ? "Path" : "PATH");
+# Set an environment variable that we can test in the makefile.
+$extraENV{FOOFOO} = 'foo foo';
-run_make_test("
+run_make_test("space = ' '".'
null :=
-space = ' '
-auto_var = udef space CC null $pathvar".' MAKE foo CFLAGS WHITE @ <
+auto_var = udef space CC null FOOFOO MAKE foo CFLAGS WHITE @ <
foo = bletch null @ garf
av = $(foreach var, $(auto_var), $(origin $(var)) )
override WHITE := BLACK
@@ -36,6 +31,7 @@ for2: ; @echo $(fe)',
"undefined file default file environment default file command line override automatic automatic
foo.o bletch.o null.o @.o garf.o .o .o undefined.o file.o default.o file.o environment.o default.o file.o command.o line.o override.o automatic.o automatic.o");
+delete $extraENV{FOOFOO};
# TEST 1: Test that foreach variables take precedence over global
# variables in a global scope (like inside an eval). Tests bug #11913