#
# 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 update-proto update-proto-error vendor-specific-error comments smash
+KEYWORD_UPDATE_TESTS := update-attr-ref-null update-error-3 update-group-error 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
+++ /dev/null
-#
-# PRE: if
-#
-
-# One comment
-#{ Two comment
-#} Three comment
-#'Four'
-#"Five comment"
-##Six Comment#
- #Seven comment (yes i'm meant to be tabbed in)
- #Eight comment (yes i'm meant to have spaces before me)
- #Nine comment (tabs and spaces, are you crazy?!)
-
-update { #}'{ Opening block with extra special chars {} '"
- &control.User-Name := 'whatever' # do some random stuff
-} #{'} Closing block with extra special chars {} '"
-
-update { &Tmp-String-0 := 'candy' } # Comment after unicorn block
-
-&request += {
- &Reply-Message = 'I am #literally a comment #'
-}
-&request += {
- &Reply-Message = "I am #literally a comment #"
-}
-
-if (!(&Tmp-String-0 == 'candy')) {
- test_fail
-}
-
-if !(&request.Reply-Message[0] == 'I am #literally a comment #') {
- test_fail
-}
-
-if (!(&request.Reply-Message[1] == "I am #literally a comment #")) {
- test_fail
-}
-
-ok # I'm a comment after a module call
-ok # I'm a comment # after a module {} call
-
-ok, ok, ok, ok, ok
-
-success
+++ /dev/null
-#
-# PROTOCOL: dhcpv4
-#
-# Not really, but it's a way to test cross-protocol issues
-#
-update {
- &Proto.radius.User-Name = 'uid'
- &Password.With-Header = 'userPassword'
-}
-
-success
+++ /dev/null
-#
-# PROTOCOL: dhcpv4
-#
-# We cannot refer to internal attributes by number
-# Those numbers don't mean anything.
-#
-update {
- &Proto.1.User-Name += 'foo' # ERROR
-}
-
-success