Debian Codegraph @

src/tests/keywords/xlat-attr

raw
1 #
2 # PRE: update
3 #
4 # Check attribute info xlats work correctly
5 #
6 update {
7 control:Cleartext-Password := 'hello'
8 reply:Filter-Id := 'filter'
9 }
10
11 update request {
12 Reply-Message := 'foo'
13 FreeRADIUS-Proxied-To := 127.0.0.1
14 }
15
16 if ("%{attr:&FreeRADIUS-Proxied-To}" != 'FreeRADIUS-Proxied-To') {
17 update reply {
18 Filter-Id += 'Fail 0'
19 }
20 }
21
22 if ("%{attr_num:&FreeRADIUS-Proxied-To}" != 1) {
23 update reply {
24 Filter-Id += 'Fail 2'
25 }
26 }
27
28 if ("%{vendor:&FreeRADIUS-Proxied-To}" != 'FreeRADIUS') {
29 update reply {
30 Filter-Id += 'Fail 3'
31 }
32 }
33
34 if ("%{vendor_num:&FreeRADIUS-Proxied-To}" != 11344) {
35 update reply {
36 Filter-Id += 'Fail 4'
37 }
38 }
39
40 if ("%{attr:&Reply-Message}" != 'Reply-Message') {
41 update reply {
42 Filter-Id += 'Fail 5'
43 }
44 }
45
46 if ("%{attr_num:&Reply-Message}" != 18) {
47 update reply {
48 Filter-Id += 'Fail 6'
49 }
50 }
51
52 if ("%{vendor:&Reply-Message}" != '') {
53 update reply {
54 Filter-Id += 'Fail 7'
55 }
56 }
57
58 if ("%{vendor_num:&Reply-Message}" != 0) {
59 update reply {
60 Filter-Id += 'Fail 8'
61 }
62 }