fr_token_t op;
char const *attr, *value, *end;
+ if (cf_item_is_section(ci)) {
+ cf_log_err(ci, "Cannot specify subsections for 'update'");
+ return NULL;
+ }
+
if (!cf_item_is_pair(ci)) continue;
cp = cf_item_to_pair(ci);
# All of the "update" tests which should also be run with "-S rewrite_update=yes"
#
# update-attr-ref-null &foo := &bar, where bar doesn't exist. Now does nothing
-# update-error-3 is now a run-time error instead of parse error
-# update-group-error error is on a different line
# update-null-value-assign foo := "%{...}" should be an empty string
-# update-remove-index used to do???, now is parse-time error
+# update-remove-index Remove by index _and_ value. Not implemented in edit code
# update-filter lots of errors
#
# Tests for the "update" keyword
-KEYWORD_UPDATE_TESTS := update-error-3 update-group-error update-null-value-assign update-remove-index update-filter vendor-specific-error
+KEYWORD_UPDATE_TESTS := update-null-value-assign update-remove-index update-filter vendor-specific-error
-# 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
+# Tests for rewriting "update"
+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 update-error-3 update-group-error
#
# Migration support. Some of the tests don't run under the new
# PRE: update
#
update reply {
- &Tmp-String-0 := "foo"
+# &Tmp-String-0 := "foo"
#
# This is a string, so it's NOT allowed.
#
- # @fixme - EDIT - the error is now on the first line
- #
- &Tmp-String-1 := {
- Tmp-String-2 := "1.0" # ERROR
+ &Tmp-String-1 := { # ERROR
+ Tmp-String-2 := "1.0"
}
}