#
# PRE: cache-logic
#
-update {
- &request.Tmp-String-0 := 'testkey'
-}
-
-update control {
- &Tmp-String-1 := 'cache me'
-}
+&Tmp-String-0 := 'testkey'
+&control.Tmp-String-1 := 'cache me'
cache
if (!ok) {
test_fail
}
-update request {
- &Tmp-String-2 := "%(cache:request.Tmp-String-1)"
-}
+&request.Tmp-String-2 := "%(cache:request.Tmp-String-1)"
if (&Tmp-String-2 != &control.Tmp-String-1) {
test_fail
}
-update request {
- &Tmp-String-3 := "%(cache:request.Tmp-String-4)"
-}
+&Tmp-String-3 := "%(cache:request.Tmp-String-4)"
if (&Tmp-String-3 != "") {
test_fail
-update request {
- &Vendor-Specific.FreeRADIUS.Proxied-To := 127.0.0.1
-}
+&Vendor-Specific.FreeRADIUS.Proxied-To := 127.0.0.1
+
&Reply-Message := 'foo'
if ("%(attr_by_num:1)" != 'User-Name') {
# Invalid modhex string - not even length
&Tmp-String-0 := "vvrbuctetdh"
-update request {
- &Tmp-String-1 := "%{modhextohex:%{Tmp-String-0}}"
-}
+&Tmp-String-1 := "%{modhextohex:%{Tmp-String-0}}"
if (ok) {
test_fail
}
# Invalid modhex string - invalid characters
-update request {
- &Tmp-String-0 := "vxrbmctetdhc"
-}
+&Tmp-String-0 := "vxrbmctetdhc"
-update request {
- &Tmp-String-1 := "%{modhextohex:%{Tmp-String-0}}"
-}
+&Tmp-String-1 := "%{modhextohex:%{Tmp-String-0}}"
if (ok) {
test_fail