summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2004-09-21 13:51:58 +0000
committerPaul Smith <psmith@gnu.org>2004-09-21 13:51:58 +0000
commit6e51d9c90a92933e6cf84ae494076b6b1cd17c3b (patch)
treed0ab984efd0890b802dde712b41e930d885141b7 /tests
parent704c60cec021d75164c8a7c34bcd667e45f184e3 (diff)
downloadgunmake-6e51d9c90a92933e6cf84ae494076b6b1cd17c3b.tar.gz
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 :-/).
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/functions/eval24
1 files changed, 24 insertions, 0 deletions
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;