diff options
Diffstat (limited to 'tests/scripts/functions/call')
-rw-r--r-- | tests/scripts/functions/call | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/scripts/functions/call b/tests/scripts/functions/call index 8b6aa36..bdb8e89 100644 --- a/tests/scripts/functions/call +++ b/tests/scripts/functions/call @@ -26,23 +26,35 @@ my-notdir = $(call notdir,$(1)) my-foreach = $(foreach $(1),$(2),$(3)) my-if = $(if $(1),$(2),$(3)) +# Test recursive invocations of call with different arguments +# +one = $(1) $(2) $(3) +two = $(call one,$(1),foo,$(2)) + + all: ; @echo '$(call reverse,bar,foo)'; \ echo '$(call map,origin,MAKE reverse map)'; \ echo '$(call my-notdir,a/b c/d e/f)'; \ echo '$(call my-foreach)'; \ echo '$(call my-foreach,a,,,)'; \ - echo '$(call my-foreach,a,x y z,$(a)$(a))'; \ echo '$(call my-if,a,b,c)'; \ - echo '$(call my-if,,$(warning don't print this),ok)' + echo '$(call two,bar,baz)' EOMAKE +# These won't work until/unless PR/1527 is resolved. +# echo '$(call my-foreach,a,x y z,$(a)$(a))'; \ +# echo '$(call my-if,,$(warning don't print this),ok)' +# +# $answer = "xx yy zz\nok\n"; + # END of Contents of MAKEFILE close(MAKEFILE); &run_make_with_options($makefile, "", &get_logfile); -$answer = "foo bar\ndefault file file\nb d f\n\n\nxx yy zz\nb\nok\n"; +$answer = "foo bar\ndefault file file\nb d f\n\n\nb\nbar foo baz\n"; + &compare_output($answer, &get_logfile(1)); 1; |