Changeset 3138 in kBuild for vendor/gnumake/current/tests/scripts/functions/foreach
- Timestamp:
- Mar 12, 2018 7:32:29 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vendor/gnumake/current/tests/scripts/functions/foreach
r2596 r3138 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."; … … 54 54 'FOREACH'); 55 55 56 # Allow variable names with trailing space 57 run_make_test(q! 58 $(foreach \ 59 a \ 60 , b c d \ 61 , $(info $a)) 62 all:;@: 63 !, 64 "", "b\nc\nd\n"); 56 65 57 # TEST 2: Check some error conditions. 66 # Allow empty variable names. We still expand the body. 67 68 run_make_test(' 69 x = $(foreach ,1 2 3,a) 70 y := $x 71 72 all: ; @echo $y', 73 '', "a a a\n"); 74 75 # Check some error conditions. 58 76 59 77 run_make_test(' … … 63 81 all: ; @echo $y', 64 82 '', 65 "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'. Stop.",83 "#MAKEFILE#:2: *** insufficient number of arguments (1) to function 'foreach'. Stop.", 66 84 512); 67 85 68 86 run_make_test(' 69 x = $(foreach )87 x = $(foreach x,y) 70 88 y := $x 71 89 72 90 all: ; @echo $y', 73 91 '', 74 "#MAKEFILE#:2: *** insufficient number of arguments ( 1) to function `foreach'. Stop.",92 "#MAKEFILE#:2: *** insufficient number of arguments (2) to function 'foreach'. Stop.", 75 93 512); 76 94
Note:
See TracChangeset
for help on using the changeset viewer.

