#
# Tests for the "update" keyword
-KEYWORD_UPDATE_TESTS := update-attr-ref-null update-error-3 update-group-error update-null-value-assign update-remove-index update-filter
+KEYWORD_UPDATE_TESTS := update-attr-ref-null update-error-3 update-group-error update-null-value-assign update-remove-index update-filter update-proto update-proto-error vendor-specific-error comments smash
# Tests for rewriting "udpate"
-KEYWORD_UPDATE_REWRITE_TESTS := update-all update-array update-delete update-remove-any update-group update-hex update-remove-value update-index update-list-error update-remove-list update-prepend unknown-update update-error update-error-2 update-exec-error update-list-null-rhs update-exec
+KEYWORD_UPDATE_REWRITE_TESTS := update-all update-array update-delete update-remove-any update-group update-hex update-remove-value update-index update-list-error update-remove-list update-prepend unknown-update update-error update-error-2 update-exec-error update-list-null-rhs update-exec
-# Tests which can use new conditions, but which can't use tmpl_tokenize_all_nested=yes
-KEYWORD_UPDATE_TMPL_TESTS := foreach-regex xlat-dhcpv4
+# the protocol decoder puts the attributes into a flat namespace
+KEYWORD_UPDATE_TMPL_TESTS := xlat-dhcpv4
#
# Migration support. Some of the tests don't run under the new
ifneq "$(findstring ${1}, paircmp if-paircmp)" ""
$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=no
-else ifneq "$(findstring ${1}, comments update-to-edit if-regex-multivalue smash unknown $(KEYWORD_UPDATE_TESTS) vendor_specific vendor_specific.raw xlat-unknown update-proto update-proto-error)" ""
+else ifneq "$(findstring ${1}, update-to-edit $(KEYWORD_UPDATE_TESTS) xlat-unknown )" ""
$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes
else ifneq "$(findstring ${1}, $(KEYWORD_UPDATE_REWRITE_TESTS))" ""
-$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes -S rewrite_update=yes
+$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes -S rewrite_update=yes -S tmpl_tokenize_all_nested=yes
else ifneq "$(findstring ${1}, $(KEYWORD_UPDATE_TMPL_TESTS))" ""
$(OUTPUT)/${1}: NEW_COND=-S use_new_conditions=yes -S forbid_update=yes
# PRE: update if
#
-update request {
- &Vendor-Specific.Cisco.AVPair := 'foo=bar'
- &Vendor-Specific.Cisco.AVPair += 'bar=baz'
- &Vendor-Specific.Cisco.AVPair += 'baz=foo'
-}
+&Vendor-Specific.Cisco.AVPair := { 'foo=bar', 'bar=baz', 'baz=foo' }
+
if (&Vendor-Specific.Cisco.AVPair[1] =~ /bar=(.*)/) {
if (!("%{1}" == 'baz')) {