summaryrefslogtreecommitdiff
path: root/tests/scripts/variables
diff options
context:
space:
mode:
Diffstat (limited to 'tests/scripts/variables')
-rw-r--r--tests/scripts/variables/flavors25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/scripts/variables/flavors b/tests/scripts/variables/flavors
index 88e9ad5..3ceac5e 100644
--- a/tests/scripts/variables/flavors
+++ b/tests/scripts/variables/flavors
@@ -155,4 +155,29 @@ world');
run_make_test(undef, 'V1=@ V2=@', 'hello
world');
+# TEST #10
+# -------
+# Test the basics; a "@" internally to the variable applies to only one line.
+# A "@" before the variable applies to the entire variable.
+
+run_make_test('
+define FOO
+@echo hello
+echo world
+endef
+define BAR
+echo hello
+echo world
+endef
+
+all: foo bar
+foo: ; $(FOO)
+bar: ; @$(BAR)
+', '', 'hello
+echo world
+world
+hello
+world
+');
+
1;