VirtualBox

Ignore:
Timestamp:
Mar 14, 2018 9:28:10 PM (7 years ago)
Author:
bird
Message:

kmk: Merged in changes from GNU make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6 / https://git.savannah.gnu.org/git/make.git).

Location:
trunk/src/kmk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk

  • trunk/src/kmk/tests/scripts/functions/foreach

    r2175 r3140  
    11#                                                                    -*-perl-*-
    2 # $Id: foreach,v 1.5 2006/03/10 02:20:46 psmith Exp $
     2# $Id$
    33
    44$description = "Test the foreach function.";
     
    5656              'FOREACH');
    5757
     58# Allow variable names with trailing space
     59run_make_test(q!
     60$(foreach \
     61  a \
     62, b c d \
     63, $(info $a))
     64all:;@:
     65!,
     66              "", "b\nc\nd\n");
    5867
    59 # TEST 2: Check some error conditions.
     68# Allow empty variable names.  We still expand the body.
     69
     70run_make_test('
     71x = $(foreach ,1 2 3,a)
     72y := $x
     73
     74all: ; @echo $y',
     75              '', "a a a\n");
     76
     77# Check some error conditions.
    6078
    6179run_make_test('
     
    6583all: ; @echo $y',
    6684              '',
    67               "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'.  Stop.",
     85              "#MAKEFILE#:2: *** insufficient number of arguments (1) to function 'foreach'.  Stop.",
    6886              512);
    6987
    7088run_make_test('
    71 x = $(foreach )
     89x = $(foreach x,y)
    7290y := $x
    7391
    7492all: ; @echo $y',
    7593              '',
    76               "#MAKEFILE#:2: *** insufficient number of arguments (1) to function `foreach'.  Stop.",
     94              "#MAKEFILE#:2: *** insufficient number of arguments (2) to function 'foreach'.  Stop.",
    7795              512);
    7896
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette