]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
simplification
authorAlan T. DeKok <aland@freeradius.org>
Thu, 1 Sep 2022 22:10:15 +0000 (18:10 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 14 Sep 2022 02:03:25 +0000 (22:03 -0400)
perl -p -i -e 's/&request.Tmp/&Tmp/' src/tests/keywords/*

26 files changed:
src/tests/keywords/cast-ipaddr
src/tests/keywords/comments
src/tests/keywords/concat
src/tests/keywords/edit-group
src/tests/keywords/edit-leaf-multivalue
src/tests/keywords/edit-leaf-star
src/tests/keywords/edit-list
src/tests/keywords/edit-list-remove
src/tests/keywords/edit-merge
src/tests/keywords/edit-merge-lhs
src/tests/keywords/edit-union
src/tests/keywords/hex
src/tests/keywords/if-multivalue
src/tests/keywords/if-regex-match
src/tests/keywords/join
src/tests/keywords/pairs
src/tests/keywords/pap
src/tests/keywords/parallel-rcode
src/tests/keywords/sha1
src/tests/keywords/sha1-error
src/tests/keywords/sha2
src/tests/keywords/subrequest-return
src/tests/keywords/update-prepend
src/tests/keywords/update-remove-any
src/tests/keywords/update-remove-index
src/tests/keywords/update-remove-value

index 56f27f2291d53ab529167e80e81768b78e972f28..15609733b72aebcfef44229bb3183936421f97a5 100644 (file)
@@ -2,7 +2,7 @@
 #  PRE: if redundant
 #
 &request.NAS-IP-Address                := 127.0.0.1
-&request.Tmp-Integer-0         := 0x7f000001
+&Tmp-Integer-0         := 0x7f000001
 
 &Tmp-String-0                  := &NAS-IP-Address
 
index 897618373ee61e9191e0119579caced6e58fd7d8..e45834ab78d5ed9ba0d405b58e975b1bc6bce134 100644 (file)
@@ -16,7 +16,7 @@ update {                                      #}'{ Opening block with extra special chars {} '"
        &control.User-Name := 'whatever'                # do some random stuff
 }                                              #{'} Closing block with extra special chars {} '"
 
-update { &request.Tmp-String-0 := 'candy' }    # Comment after unicorn block
+update { &Tmp-String-0 := 'candy' }    # Comment after unicorn block
 
 &request += {
        &Reply-Message = 'I am #literally a comment #'
@@ -25,7 +25,7 @@ update { &request.Tmp-String-0 := 'candy' }   # Comment after unicorn block
        &Reply-Message = "I am #literally a comment #"
 }
 
-if (&request.Tmp-String-0 != 'candy') {
+if (&Tmp-String-0 != 'candy') {
        test_fail
 }
 
index 56a82c1e0b4a096cee5ff97a7c27ac8fdff1f491..c71ca4da6885de281993fa9792337925b1af6b8d 100644 (file)
@@ -23,7 +23,7 @@ ok    # separate updates
        &Tmp-String-1 = "%(concat:%(ungroup:%{request[*]}) ', ')"
 }
 
-if (&request.Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
+if (&Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
        test_fail
 }
 
@@ -31,7 +31,7 @@ if (&request.Tmp-String-1 != "bob, hello, ab c, de fg, 123") {
        &Tmp-String-2 = "%(concat:%{Tmp-String-0[*]} ', ')"
 }
 
-if (&request.Tmp-String-2 != "ab c, de fg") {
+if (&Tmp-String-2 != "ab c, de fg") {
        test_fail
 }
 
@@ -40,7 +40,7 @@ if (&request.Tmp-String-2 != "ab c, de fg") {
        &Tmp-String-3 = "%(concat:%{Tmp-String-0[*]})"
 }
 
-if (&request.Tmp-String-3 != "ab cde fg") {
+if (&Tmp-String-3 != "ab cde fg") {
        test_fail
 }
 
@@ -49,7 +49,7 @@ if (&request.Tmp-String-3 != "ab cde fg") {
        &Tmp-String-4 = "%(concat:%{Tmp-String-0[*]} ,)"
 }
 
-if (&request.Tmp-String-4 != "ab c,de fg") {
+if (&Tmp-String-4 != "ab c,de fg") {
        test_fail
 }
 
@@ -58,7 +58,7 @@ if (&request.Tmp-String-4 != "ab c,de fg") {
        &Tmp-String-5 = "%(concat:%{Tmp-String-0[*]} |-)"
 }
 
-if (&request.Tmp-String-5 !="ab c|-de fg") {
+if (&Tmp-String-5 !="ab c|-de fg") {
        test_fail
 }
 
index 0690da16f027cb252054916da1100f5c9d274d08..050001cf4c228d82c0ab20d8b35ee7eb71578a0b 100644 (file)
@@ -7,20 +7,20 @@
 #  them are rolled back.
 #
 group {
-       &request.Tmp-String-0 := "foo"
-       &request.Tmp-String-1 := %{request.Tmp-Integer-0}  # doesn't exist
-       &request.Tmp-String-2 := "bar"
+       &Tmp-String-0 := "foo"
+       &Tmp-String-1 := %{request.Tmp-Integer-0}  # doesn't exist
+       &Tmp-String-2 := "bar"
 }
 
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
-if (&request.Tmp-String-1) {
+if (&Tmp-String-1) {
        test_fail
 }
 
-if (&request.Tmp-String-2) {
+if (&Tmp-String-2) {
        test_fail
 }
 
@@ -28,20 +28,20 @@ if (&request.Tmp-String-2) {
 #  All of these succeed individually, so all of them should succeed.
 #
 group {
-       &request.Tmp-String-0 := "foo"
-       &request.Tmp-String-1 := "yup"
-       &request.Tmp-String-2 := "bar"
+       &Tmp-String-0 := "foo"
+       &Tmp-String-1 := "yup"
+       &Tmp-String-2 := "bar"
 }
 
-if (&request.Tmp-String-0 != "foo") {
+if (&Tmp-String-0 != "foo") {
        test_fail
 }
 
-if (&request.Tmp-String-1 != "yup") {
+if (&Tmp-String-1 != "yup") {
        test_fail
 }
 
-if (&request.Tmp-String-2 != "bar") {
+if (&Tmp-String-2 != "bar") {
        test_fail
 }
 
index 246e9c70168f132440396296fad5cd79679541f6..a67efad2752bdb27bcce5174b0ca467ad8dfa2fc 100644 (file)
@@ -1,7 +1,7 @@
 #
 # PRE: edit
 #
-&request.Tmp-String-0 := {
+&Tmp-String-0 := {
        "foo",
        "bar",
        "baz",
@@ -12,19 +12,19 @@ if (%{request.Tmp-String-0[#]} != 4) {
        test_fail
 }
 
-if (&request.Tmp-String-0[0] != "foo") {
+if (&Tmp-String-0[0] != "foo") {
        test_fail
 }
 
-if (&request.Tmp-String-0[1] != "bar") {
+if (&Tmp-String-0[1] != "bar") {
        test_fail
 }
 
-if (&request.Tmp-String-0[2] != "baz") {
+if (&Tmp-String-0[2] != "baz") {
        test_fail
 }
 
-if (&request.Tmp-String-0[3] != "bob") {
+if (&Tmp-String-0[3] != "bob") {
        test_fail
 }
 
index f11cd8d62b3e322dcf51fc2d642fad13999d7d68..e4664c11daf8886af25a36a75f135102f7585c91 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  PRE: edit
 #
-&request.Tmp-Integer-0 := { 1, 3, 5, 7, 11 }
+&Tmp-Integer-0 := { 1, 3, 5, 7, 11 }
 
 &Tmp-Integer-1 := 0
 
index b12bf9a9f9144a3291f5d56bbfb418e147a95c7b..4152614ac1da72cfffc38c32fee69838ba1e4b9d 100644 (file)
@@ -5,7 +5,7 @@
 &control.Tmp-String-0 := "foo"
 
 #  Doesn't exist
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
@@ -13,14 +13,14 @@ if (&request.Tmp-String-0) {
 &request += &control
 
 #  Does exist, and is the last attribute
-if (!&request.Tmp-String-0[n]) {
+if (!&Tmp-String-0[n]) {
        test_fail
 }
 
 &request -= &Tmp-String-0[*]
 
 #  Doesn't exist
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
@@ -28,7 +28,7 @@ if (&request.Tmp-String-0) {
 &request ^= &control
 
 #  Does exist, and is at offset 0
-if (!&request.Tmp-String-0[0]) {
+if (!&Tmp-String-0[0]) {
        test_fail
 }
 
index 11ccda4760b68037f8cf3cb51d5753d059ddc6de..e6d03d8048271f7caa4007fb4fd9ffb380334bc2 100644 (file)
@@ -9,7 +9,7 @@
 }
 
 #  Does exist
-if (!&request.Tmp-String-0) {
+if (!&Tmp-String-0) {
        test_fail
 }
 
@@ -17,16 +17,16 @@ if (!&request.Tmp-String-0) {
 &request -= &Tmp-String-0
 
 #  Does not exist
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
 # Other things still exist
-if (!&request.Tmp-Octets-0) {
+if (!&Tmp-Octets-0) {
        test_fail
 }
 
-if (!&request.Tmp-Integer-0) {
+if (!&Tmp-Integer-0) {
        test_fail
 }
 
@@ -39,34 +39,34 @@ if (!&request.Tmp-Integer-0) {
        &Tmp-String-0 = "baz"
 }
 
-if (!&request.Tmp-String-0) {
+if (!&Tmp-String-0) {
        test_fail
 }
 
 &request -= &Tmp-String-0[0]
 
 #  the first one has been removed
-if (&request.Tmp-String-0[0] != "bar") {
+if (&Tmp-String-0[0] != "bar") {
        test_fail
 }
 
 # Other things still exist
-if (!&request.Tmp-Octets-0) {
+if (!&Tmp-Octets-0) {
        test_fail
 }
 
-if (!&request.Tmp-Integer-0) {
+if (!&Tmp-Integer-0) {
        test_fail
 }
 
 &request -= &Tmp-String-0[*]
 
 # Does not exist
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
-&request.Tmp-String-0 := { "foo", "bar", "baz" }
+&Tmp-String-0 := { "foo", "bar", "baz" }
 
 #
 #  Remove one by value.
index 44a175f3f9e20f9b2aa51b00714b8c981bd216fb..3ae0d27cc842344e01253ce46fef72cf3628e34b 100644 (file)
@@ -8,24 +8,24 @@
 #      = A' MERGE B' if A and B are lists
 #
 
-&request.Tmp-String-0 := "foo"
+&Tmp-String-0 := "foo"
 &control.Tmp-String-0 := "bar"
 
 # merge
 &request >= &control
 
-if (!&request.Tmp-String-0) {
+if (!&Tmp-String-0) {
        test_fail
 }
 
 # The original value should be unchanged
-if (!(&request.Tmp-String-0 == "foo")) {
+if (!(&Tmp-String-0 == "foo")) {
        %(debug_attr:request[*])
        test_fail
 }
 
 #  and the new value should not be there
-if (&request.Tmp-String-0 == "bar") {
+if (&Tmp-String-0 == "bar") {
        %(debug_attr:request[*])
        test_fail
 }
index c3fc3fd74939b30b29dd412cd6766c6812111042..57662ed62343d57ee22d60f9f54a4a127d14dfef 100644 (file)
@@ -8,24 +8,24 @@
 #      = A' MERGE B' if A and B are lists
 #
 
-&request.Tmp-String-0 := "foo"
+&Tmp-String-0 := "foo"
 &control.Tmp-String-0 := "bar"
 
 # merge
 &request <= &control
 
-if (!&request.Tmp-String-0) {
+if (!&Tmp-String-0) {
        test_fail
 }
 
 # we want the *control* version
-if (!(&request.Tmp-String-0 == "bar")) {
+if (!(&Tmp-String-0 == "bar")) {
        %(debug_attr:request[*])
        test_fail
 }
 
 #  and the original value should not be there
-if (&request.Tmp-String-0 == "foo") {
+if (&Tmp-String-0 == "foo") {
        %(debug_attr:request[*])
        test_fail
 }
index 981d715d004e5c830ce460dc41cb81a349e1fe19..a486f1410522b9a68a98e7439ee21ff1037a6883 100644 (file)
@@ -8,24 +8,24 @@
 #      = A' UNION B' if A and B are lists
 #
 
-&request.Tmp-String-0 := "foo"
+&Tmp-String-0 := "foo"
 &control.Tmp-String-0 := "bar"
 
 # union
 &request |= &control
 
-if (!&request.Tmp-String-0) {
+if (!&Tmp-String-0) {
        test_fail
 }
 
 # The original value should be unchanged
-if (&request.Tmp-String-0[0] != "foo") {
+if (&Tmp-String-0[0] != "foo") {
        %(debug_attr:request[*])
        test_fail
 }
 
 #  and the new value should be there, too
-if (&request.Tmp-String-0[1] != "bar") {
+if (&Tmp-String-0[1] != "bar") {
        %(debug_attr:request[*])
        test_fail
 }
index 07307a5457af70a89e5ff64c2ffcef1df461f02e..bf65d9bd403dcd4c7a5d8059a3324701f8f709e2 100644 (file)
@@ -18,7 +18,7 @@
 
 ok  # break up edit sections
 
-&request.Tmp-String-1 := {
+&Tmp-String-1 := {
        "%{hex:%{Tmp-String-0}}"
        "%{hex:%{Tmp-Octets-0}}"
        "%{hex:%{Tmp-IP-Address-0}}"
@@ -69,7 +69,7 @@ if (&Tmp-String-1[7] != '3a') {
        test_fail
 }
 
-&request.Tmp-String-1 := {
+&Tmp-String-1 := {
        "%{hex:%{Tmp-Cast-Short}}"
        "%{hex:%{Tmp-Cast-Ether}}"
        "%{hex:%{Tmp-Cast-Integer64}}"
index 5be80c6a015c78e560b0af3171eecc434991ea64..f7311e007026671cb17c6035ab09b26d543cc0b9 100644 (file)
 #
 #  Mmmm O(N^2)
 #
-if (&request.Tmp-String-0[*] != &control.Tmp-String-0[*]) {
+if (&Tmp-String-0[*] != &control.Tmp-String-0[*]) {
        test_fail
 }
 
-if (&request.Tmp-String-0[*] == &control.Tmp-String-1[*]) {
+if (&Tmp-String-0[*] == &control.Tmp-String-1[*]) {
        test_fail
 }
 
-if (&request.Tmp-String-1[*] == &control.Tmp-String-0[*]) {
+if (&Tmp-String-1[*] == &control.Tmp-String-0[*]) {
        test_fail
 }
 
 #
 #  Integer comparison and normalisation
 #
-if (&request.Tmp-Integer-0 != &control.Tmp-Integer-0) {
+if (&Tmp-Integer-0 != &control.Tmp-Integer-0) {
        test_fail
 }
 
@@ -70,14 +70,14 @@ if (&request.Tmp-Integer-0 != &control.Tmp-Integer-0) {
 #  if any value of request.Tmp-Integer-0 > any value of
 #  request.Tmp-Integer-1 then evaluate to true
 #
-if (&request.Tmp-Integer-0[*] > &control.Tmp-Integer-1[*]) {
+if (&Tmp-Integer-0[*] > &control.Tmp-Integer-1[*]) {
        test_fail
 }
 
 #
 #  Compiled regex comparisons
 #
-if (&request.Tmp-String-1[*] !~ /PEONS$/) {
+if (&Tmp-String-1[*] !~ /PEONS$/) {
        test_fail
 }
 
@@ -92,19 +92,19 @@ if (&control.Tmp-String-1 =~ /DINKS$/) {
 #
 #  Dynamic regex comparisons
 #
-if (&request.Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) {
+if (&Tmp-String-1[*] !~ /%{Tmp-String-2[0]}$/) {
        test_fail
 }
 
-if (&request.Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) {
+if (&Tmp-String-1 =~ /%{Tmp-String-2[1]}$/) {
        test_fail
 }
 
-if (&request.Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) {
+if (&Tmp-String-1 !~ /%{Tmp-String-2[2]}$/) {
        test_fail
 }
 
-if (&request.Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) {
+if (&Tmp-String-1 =~ /%{Tmp-String-2[#]}$/) {
        test_fail
 }
 
@@ -126,11 +126,11 @@ if (&control.Tmp-String-1[*] == 'foo') {
        test_fail
 }
 
-if (&request.Tmp-Integer-0[*] > 10) {
+if (&Tmp-Integer-0[*] > 10) {
        test_fail
 }
 
-if (!(&request.Tmp-Integer-0[*] < 10)) {
+if (!(&Tmp-Integer-0[*] < 10)) {
        test_fail
 }
 
index 596c7a4a71d4e2b650e8f323d82d83ab32d347c8..e9c4336b090f23c5474bdfd053324b514f6a1cc2 100644 (file)
@@ -1,6 +1,6 @@
 # PRE: if
 #
-&request.Tmp-Integer-0 := '123456789'
+&Tmp-Integer-0 := '123456789'
 
 # Non matching on attribute ref
 if (&User-Name !~ /^([0-9])_([0-9])?_([0-9]*)_([0-9]+)_([^_])_(6)_([7-8])%{Tmp-String-0}/) {
@@ -91,7 +91,7 @@ if (&Tmp-Integer-0 !~ /%{Tmp-Integer-0}/) {
        test_fail
 }
 
-&request.Tmp-String-0 := "foo\nbar"
+&Tmp-String-0 := "foo\nbar"
 
 # uncompiled - ref - multiline
 if (&Tmp-String-0 !~ /^foo$%{Tmp-String-8}/m) {
index f6ed97e47f2f5ec2ac81134f9066f7c178bba77a..2098b7b7f28b97e0f3f3a8637f2faeeb8e3768ab 100644 (file)
@@ -30,7 +30,7 @@ if (&control.Tmp-String-1 != "bob. hello. ab c. de fg. 123. 192.168.1.254") {
 }
 
 &Tmp-String-2 := "%(concat:%(join:%{Tmp-String-0[*]} %{Tmp-Integer-0}) ,)"
-if (&request.Tmp-String-2 != "ab c,de fg,123") {
+if (&Tmp-String-2 != "ab c,de fg,123") {
        test_fail
 }
 
index fb60e13d2bdee90bfa070940582be57183201878..89c35127abada35e95260d0fd15f4c2bbf68ca38 100644 (file)
        &Tmp-String-5 = "%(pairs:control.User-Name)"
 }
 
-if (&request.Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") {
+if (&Tmp-String-1 != "User-Name = \"bob\", User-Password = \"hello\", Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\", Tmp-Octets-0 = 0x000504030201, Tmp-Integer-0 = 7331") {
        test_fail
 }
 
-if (&request.Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") {
+if (&Tmp-String-2 != "Tmp-String-0 = \"This is a string\"") {
        test_fail
 }
 
-if (&request.Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") {
+if (&Tmp-String-3 != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") {
        test_fail
 }
 
-if (&request.Tmp-String-4 != "Password.Cleartext = \"hello\"") {
+if (&Tmp-String-4 != "Password.Cleartext = \"hello\"") {
        test_fail
 }
 
-if (&request.Tmp-String-5 != '') {
+if (&Tmp-String-5 != '') {
        test_fail
 }
 
index 84d8ac5efc3c003c15dfe62cc39579f6d88bf985..033b64121447273e25fa63c1b261e29960db9b10 100644 (file)
@@ -2,7 +2,7 @@
 # PRE: edit-list-remove if
 #
 &control := {}
-&request.Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK"        # 60 byte salt
+&Tmp-String-0 := "5RNqNl8iYLbkCc7JhR8as4TtDDCX6otuuWtcja8rITUyx9zrnHSe9tTHGmKK"        # 60 byte salt
 
 #
 #  Unencoded Password.Cleartext in password with header
index e1e5f81ee1fb879f03cf9dce3315493c8f309653..c0ad6e8982ebdb707e2596967f60ec14a7910dae 100644 (file)
@@ -37,7 +37,7 @@ group {
 if (!fail) {
        test_fail
 }
-if (&request.Tmp-String-0) {
+if (&Tmp-String-0) {
        test_fail
 }
 
@@ -61,7 +61,7 @@ group {
 if (!fail) {
        test_fail
 }
-if (&request.Tmp-String-0 != 'foo') {
+if (&Tmp-String-0 != 'foo') {
        test_fail
 }
 
index 021498149011628b952865f54396bedef21fd3fb..3636c0b6a5b493f84b15719ac7e8c44efc2ec8cd 100644 (file)
 #  Put "This is a string" into a file and call "sha1sum" on it.
 #  You should get this string.
 #
-if (&request.Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (&Tmp-Octets-2 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
        test_fail
 }
 
-if (&request.Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (&Tmp-Octets-3 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
        test_fail
 }
 
-if (&request.Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
+if (&Tmp-Octets-4 != 0xcc7edf1ccc4bdf1e0ec8f72b95388b65218ecf0c) {
        test_fail
 }
 
 #
 # SHA1 of empty string
 #
-if (&request.Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) {
+if (&Tmp-Octets-5 != 0xda39a3ee5e6b4b0d3255bfef95601890afd80709) {
        test_fail
 }
 
 #
 #  SHA1 HMAC with attribute references
 #
-if (&request.Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) {
+if (&Tmp-Octets-6 != 0xeffcdf6ae5eb2fa2d27416d5f184df9c259a7c79) {
        test_fail
 }
 
index 5e382540fd515d0052b427e12ed02c4bd4d54b5b..828ffb5837cb08a5dc57e9f4180e6826521df699 100644 (file)
@@ -3,7 +3,7 @@
 #
 #  SHA1 HMAC with missing key should fail
 #
-&request.Tmp-Octets-1 := "%(hmacsha1:%{Tmp-String-1} )" # ERROR
+&Tmp-Octets-1 := "%(hmacsha1:%{Tmp-String-1} )" # ERROR
 
 
 test_fail
index 029eaa8b90bd9ee8d90424374ab1c0bf927cea7b..9bba7e23f998e49ad89c87fef714dbb9e2226ce2 100644 (file)
@@ -1,42 +1,42 @@
 #
 # PRE: update if
 #
-&request.Tmp-String-0 := "This is a string\n"
-&request.Tmp-Octets-0 := 0x000504030201
+&Tmp-String-0 := "This is a string\n"
+&Tmp-Octets-0 := 0x000504030201
 
-&request.Tmp-Octets-1 := "%{sha2_256:This is a string\n}"
-&request.Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}"
-&request.Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}"
-&request.Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}"
-&request.Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}"
+&Tmp-Octets-1 := "%{sha2_256:This is a string\n}"
+&Tmp-Octets-2 := "%{sha2_256:%{Tmp-String-0}}"
+&Tmp-Octets-3 := "%{sha2_256:%{request.Tmp-String-0}}"
+&Tmp-Octets-4 := "%{sha2_256:%{request.Tmp-Octets-0}}"
+&Tmp-Octets-5 := "%{sha2_256:%{request.Tmp-Octets-9}}"
 
 #
 #  Put "This is a string" into a file and call "sha2_256sum" on it.
 #  You should get this string.
 #
-if (&request.Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (&Tmp-Octets-1 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
        test_fail
 }
 
-if (&request.Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (&Tmp-Octets-2 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
        test_fail
 }
 
-if (&request.Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
+if (&Tmp-Octets-3 != 0xb3716a1ab53042bb392034f29071e13b0c38aa19b4edd75d9a76022f91189124) {
        test_fail
 }
 
 #
 #  SHA256 should also be able to cope with references to octet attributes
 #
-if (&request.Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) {
+if (&Tmp-Octets-4 != 0xf307e202b881fded70e58017aa0c4d7b29c76ab25d02bf078301a5f6635187eb) {
        test_fail
 }
 
 #
 # SHA256 of empty string
 #
-if (&request.Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) {
+if (&Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855) {
        test_fail
 }
 
@@ -44,19 +44,19 @@ if (&request.Tmp-Octets-5 != 0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca
 #  SHA512 and SHA256 share common code paths, so the tests don't need to be
 #  as exhaustive.
 #
-&request.Tmp-Octets-1 := "%{sha2_512:This is a string\n}"
-&request.Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}"
-&request.Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}"
+&Tmp-Octets-1 := "%{sha2_512:This is a string\n}"
+&Tmp-Octets-2 := "%{sha2_512:%{Tmp-String-0}}"
+&Tmp-Octets-3 := "%{sha2_512:%{request.Tmp-Octets-0}}"
 
-if (&request.Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
+if (&Tmp-Octets-1 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
        test_fail
 }
 
-if (&request.Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
+if (&Tmp-Octets-2 != 0x56b57df5cce42d4e35c644649798ea23ec16f4f4626e78faf4d2d8f430ea349bcc28cd5532457c82f0aa66bf68988346039fe75b900a92ff94fd53993d45990f) {
        test_fail
 }
 
-if (&request.Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) {
+if (&Tmp-Octets-3 != 0xde80271eb5e03a1c24dd0cd823a22305a743ee3a54f1de5bf97adbf56984561154bfb6928b1da4ccc3f5dde9f4032ad461937b60b9ace4ad3898cf45c90596d7) {
        test_fail
 }
 
index 0ede029c0a3774c15b685944d4baa83dd4b49270..24e644b29a6931fbed183bca7a40f124d97f37a6 100644 (file)
@@ -13,7 +13,7 @@ if (&Tmp-String-1) {
        test_fail
 }
 
-if (&request.Tmp-String-0 != "testing1234") {
+if (&Tmp-String-0 != "testing1234") {
        test_fail
 }
 
index 086511943e1facb68fb01dc45d3020bcdefa0fda..fde9093829d91fbc0bbe0a6a3143f31fe3233aea 100644 (file)
@@ -11,15 +11,15 @@ update control {
 # Reset the request list and add the test strings
 # FIXME:
 # Temporary way to add multiple copies of an attribute - this should become
-# &request.Tmp-String-0 += &control.Tmp-String-0 when multi copies of attributes
+# &Tmp-String-0 += &control.Tmp-String-0 when multi copies of attributes
 # are copied again.  Currently the desired syntax won't work due to tmpl_t only holding
 # a single value_box - so when mapt_to_list_mod() builds the list of value for the rhs
 # of the expression only the first one is copied to the tmpl_t.  See around line 780
 # of map_async.c
 update {
-       &request.Tmp-String-0 !* ANY
-       &request.Tmp-String-0 += &control.Tmp-String-0[0]
-       &request.Tmp-String-0 += &control.Tmp-String-0[1]
+       &Tmp-String-0 !* ANY
+       &Tmp-String-0 += &control.Tmp-String-0[0]
+       &Tmp-String-0 += &control.Tmp-String-0[1]
 }
 
 # Prepend a single value
@@ -62,7 +62,7 @@ update control {
 
 # Prepend the list of Tmp-String-0 from request to the new attribute
 #update {
-#      &control.Tmp-String-0 ^= &request.Tmp-String-0
+#      &control.Tmp-String-0 ^= &Tmp-String-0
 #}
 
 # (Temporary method to acheive the same - as per issue noted above)
index 8a312c21d8afdad4e50bc69bf1daf9126d68114d..4260ed4ae239c0c7096b01b14166ef00b41b476e 100644 (file)
@@ -2,10 +2,10 @@
 # PRE: update
 #
 update {
-       &request.Tmp-String-0 := 'foobarbaz'
-       &request.Tmp-Integer-0 := 123456789
-       &request.Tmp-IP-Address-0 := 192.0.2.1
-       &request.Tmp-IP-Address-0 += 192.0.2.2
+       &Tmp-String-0 := 'foobarbaz'
+       &Tmp-Integer-0 := 123456789
+       &Tmp-IP-Address-0 := 192.0.2.1
+       &Tmp-IP-Address-0 += 192.0.2.2
        &control.Tmp-IP-Address-0 := 192.0.2.1
        &control.Tmp-IP-Address-0 += 192.0.2.3
        &control.Tmp-IP-Address-1 := 192.0.3.1
@@ -17,7 +17,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || ("%{Tmp-IP-Address-0[1]}" != 192.
 
 # Remove all attributes in the request list
 update {
-       &request.Tmp-IP-Address-0 !* ANY
+       &Tmp-IP-Address-0 !* ANY
 }
 
 # Non Tmp-IP-Address-0 address attributes should still be in the request list
index bf050f3e8b6b02304f25ba29d2985dcd382cbc07..a71680289a1b81d3ed182afb3f83e62bcb9ad9c2 100644 (file)
@@ -3,13 +3,13 @@
 #
 
 update {
-       &request.Tmp-String-0 := 'foobarbaz'
-       &request.Tmp-Integer-0 := 123456789
-       &request.Tmp-IP-Address-0 := 192.0.2.1
-       &request.Tmp-IP-Address-0 += 192.0.2.2
-       &request.Tmp-IP-Address-0 += 192.0.2.3
-       &request.Tmp-IP-Address-0 += 192.0.2.2
-       &request.Tmp-IP-Address-0 += 192.0.2.4
+       &Tmp-String-0 := 'foobarbaz'
+       &Tmp-Integer-0 := 123456789
+       &Tmp-IP-Address-0 := 192.0.2.1
+       &Tmp-IP-Address-0 += 192.0.2.2
+       &Tmp-IP-Address-0 += 192.0.2.3
+       &Tmp-IP-Address-0 += 192.0.2.2
+       &Tmp-IP-Address-0 += 192.0.2.4
 }
 
 debug_request
index a24b5de2ce5068b1c4438097838ce1b69e36aafa..8903081659e47ae21689eff4841b5ac1a13d8b60 100644 (file)
@@ -3,12 +3,12 @@
 #
 
 update {
-       &request.Tmp-String-0 := 'foobarbaz'
-       &request.Tmp-Integer-0 := 123456789
-       &request.Tmp-IP-Address-0 := 192.0.2.1
-       &request.Tmp-IP-Address-0 += 192.0.2.2
-       &request.Tmp-IP-Address-0 += 192.0.2.3
-       &request.Tmp-IP-Address-0 += 192.0.2.4
+       &Tmp-String-0 := 'foobarbaz'
+       &Tmp-Integer-0 := 123456789
+       &Tmp-IP-Address-0 := 192.0.2.1
+       &Tmp-IP-Address-0 += 192.0.2.2
+       &Tmp-IP-Address-0 += 192.0.2.3
+       &Tmp-IP-Address-0 += 192.0.2.4
        &control.Tmp-IP-Address-0 := 192.0.2.1
        &control.Tmp-IP-Address-0 += 192.0.2.3
 }
@@ -22,7 +22,7 @@ if (("%{Tmp-IP-Address-0[0]}" != 192.0.2.1) || \
 
 # Remove Tmp-IP-Address-0 with a specific value
 update {
-       &request.Tmp-IP-Address-0 -= 192.0.2.1
+       &Tmp-IP-Address-0 -= 192.0.2.1
 }
 
 # Only the 2nd, 3rd and 4th Tmp-IP-Address attributes should still be in the list
@@ -35,7 +35,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \
 
 # Remove Tmp-IP-Address-0 with a specific value (somewhere in the middle)
 update {
-       &request.Tmp-IP-Address-0 -= 192.0.2.3
+       &Tmp-IP-Address-0 -= 192.0.2.3
 }
 
 # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list
@@ -47,7 +47,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \
 
 # Remove Tmp-IP-Address-0 with a specific value (which doesn't exist)
 update {
-       &request.Tmp-IP-Address-0 -= 192.0.2.3
+       &Tmp-IP-Address-0 -= 192.0.2.3
 }
 
 # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list
@@ -59,12 +59,12 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \
 
 # Remove Tmp-IP-Address-4 (which doesn't exist - more to check for SEGV/assert)
 update {
-       &request.Tmp-IP-Address-4 -= 192.0.2.3
+       &Tmp-IP-Address-4 -= 192.0.2.3
 }
 
 # Remove Tmp-IP-Address-0 with a specific value
 update {
-       &request.Tmp-IP-Address-0 -= 192.0.2.4
+       &Tmp-IP-Address-0 -= 192.0.2.4
 }
 
 # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list
@@ -75,7 +75,7 @@ if (("%{Tmp-IP-Address-0[0]}" != '192.0.2.2') || \
 
 # Remove Tmp-IP-Address-0 with a specific value
 update {
-       &request.Tmp-IP-Address-0 -= 192.0.2.2
+       &Tmp-IP-Address-0 -= 192.0.2.2
 }
 
 # Only the 1st, and 3rd Tmp-IP-Address attributes should still be in the list