Changeset 3140 in kBuild for trunk/src/kmk/tests/scripts/functions/foreach
- Timestamp:
- Mar 14, 2018 9:28:10 PM (7 years ago)
- Location:
- trunk/src/kmk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
tests/scripts/functions/foreach (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kmk
-
Property svn:mergeinfo
set to
/vendor/gnumake/current merged eligible
-
Property svn:mergeinfo
set to
-
trunk/src/kmk/tests/scripts/functions/foreach
r2175 r3140 1 1 # -*-perl-*- 2 # $Id : foreach,v 1.5 2006/03/10 02:20:46 psmith Exp$2 # $Id$ 3 3 4 4 $description = "Test the foreach function."; … … 56 56 'FOREACH'); 57 57 58 # Allow variable names with trailing space 59 run_make_test(q! 60 $(foreach \ 61 a \ 62 , b c d \ 63 , $(info $a)) 64 all:;@: 65 !, 66 "", "b\nc\nd\n"); 58 67 59 # TEST 2: Check some error conditions. 68 # Allow empty variable names. We still expand the body. 69 70 run_make_test(' 71 x = $(foreach ,1 2 3,a) 72 y := $x 73 74 all: ; @echo $y', 75 '', "a a a\n"); 76 77 # Check some error conditions. 60 78 61 79 run_make_test(' … … 65 83 all: ; @echo $y', 66 84 '', 67 "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'. Stop.",85 "#MAKEFILE#:2: *** insufficient number of arguments (1) to function 'foreach'. Stop.", 68 86 512); 69 87 70 88 run_make_test(' 71 x = $(foreach )89 x = $(foreach x,y) 72 90 y := $x 73 91 74 92 all: ; @echo $y', 75 93 '', 76 "#MAKEFILE#:2: *** insufficient number of arguments ( 1) to function `foreach'. Stop.",94 "#MAKEFILE#:2: *** insufficient number of arguments (2) to function 'foreach'. Stop.", 77 95 512); 78 96
Note:
See TracChangeset
for help on using the changeset viewer.

