summaryrefslogtreecommitdiff
path: root/unit-tests/directive-for.mk
diff options
context:
space:
mode:
Diffstat (limited to 'unit-tests/directive-for.mk')
-rwxr-xr-xunit-tests/directive-for.mk12
1 files changed, 10 insertions, 2 deletions
diff --git a/unit-tests/directive-for.mk b/unit-tests/directive-for.mk
index e0987d331a14..93f0a14f5892 100755
--- a/unit-tests/directive-for.mk
+++ b/unit-tests/directive-for.mk
@@ -1,6 +1,13 @@
-# $NetBSD: directive-for.mk,v 1.8 2020/10/25 15:49:03 rillig Exp $
+# $NetBSD: directive-for.mk,v 1.9 2020/11/15 20:20:58 rillig Exp $
#
# Tests for the .for directive.
+#
+# TODO: Describe naming conventions for the loop variables.
+# .for f in values
+# .for file in values
+# .for _FILE_ in values
+# .for .FILE. in values
+# .for _f_ in values
# Using the .for loop, lists of values can be produced.
# In simple cases, the :@var@${var}@ variable modifier can be used to
@@ -15,6 +22,7 @@ NUMBERS+= ${num}
.endif
# The .for loop also works for multiple iteration variables.
+# This is something that the variable modifier :@ cannot do.
.for name value in VARNAME value NAME2 value2
${name}= ${value}
.endfor
@@ -26,7 +34,7 @@ ${name}= ${value}
# just like the :M or :S variable modifiers.
#
# Until 2012-06-03, it had split the items exactly at whitespace, without
-# taking the quotes into account.
+# taking the quotes into account. This had resulted in 10 words.
#
.undef WORDS
.for var in one t\ w\ o "three three" 'four four' `five six`