if (single) goto done;
+ /*
+ * Now that the attribute has been created, go apply the rest of the values to the attribute.
+ */
+ if (!((map->op == T_OP_EQ) || (map->op == T_OP_SET))) {
+ box = fr_dcursor_next(&cursor);
+ if (!box) goto done;
+
+ goto apply_op;
+ }
+
+ if (current->lhs.vp->da->flags.local) {
+ RWDEBUG("Ignoring extra values for local variable");
+ goto done;
+ }
+
/*
* Loop over the remaining items, adding the VPs we've just created.
*/
if (!current->lhs.vp) return -1;
#endif
+apply_op:
/*
* All other operators are "modify in place", of the existing current->lhs.vp
*/
--- /dev/null
+string foo
+string bar
+string baz
+
+&baz = "a,b,c,d,e"
+
+#
+# Append, don't create multiple versions
+#
+&bar += %explode(%{baz}, ',')
+
+if !(&bar == "abcde") {
+ test_fail
+}
+
+#
+# This is a warning. We only create one copy of "foo".
+#
+# We cannot have multiple copies of local variables. There's no real
+# reason why, but for now it's safer to be limited.
+#
+&foo := %explode(%{baz}, ',')
+if !(&foo[#] == 1) {
+ test_fail
+}
+
+#
+# Append
+#
+&Reply-Message = "foo"
+
+&Reply-Message += { "a", "b", "c" }
+
+if !(&Reply-Message == "fooabc") {
+ test_fail
+}
+
+&Filter-Id := { "a", "b", "c" }
+if !(&Filter-Id[#] == 3) {
+ test_fail
+}
+
+success