From 6e51d9c90a92933e6cf84ae494076b6b1cd17c3b Mon Sep 17 00:00:00 2001 From: Paul Smith Date: Tue, 21 Sep 2004 13:51:58 +0000 Subject: Some code cleanups and efficiency enhancements. As far as I can tell none of these have impacts that are visible to the user (although in some cases that appears to be nothing more than dumb luck :-/). --- tests/scripts/functions/eval | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'tests/scripts/functions/eval') diff --git a/tests/scripts/functions/eval b/tests/scripts/functions/eval index 372aaf8..c69a110 100644 --- a/tests/scripts/functions/eval +++ b/tests/scripts/functions/eval @@ -134,4 +134,28 @@ $answer = "OK\n"; delete $ENV{EVAR}; + +# Clean out previous information to allow new run_make_test() interface. +# If we ever convert all the above to run_make_test() we can remove this line. +$makefile = undef; + +# Test handling of backslashes in strings to be evaled. + +run_make_test(' +define FOO +all: ; @echo hello \ +world +endef +$(eval $(FOO)) +', '', 'hello world'); + +run_make_test(' +define FOO +all: ; @echo he\llo + @echo world +endef +$(eval $(FOO)) +', '', 'hello +world'); + 1; -- cgit v1.2.3