Debian Codegraph @

src/tests/keywords/pairs

raw
1 #
2 # PRE: update if
3 #
4 update {
5 control:Cleartext-Password := 'hello'
6 request:Tmp-String-0 := "This is a string"
7 request:Tmp-String-0 += "This is another one"
8 request:Tmp-Octets-0 := 0x000504030201
9 request:Tmp-Integer-0 := 7331
10 request:Tunnel-Private-Group-Id:5 = 127.0.0.1
11 reply:Filter-Id = 'filter'
12 }
13
14 if ("%{pairs:request:}" != "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, Tunnel-Private-Group-Id:5 = \"127.0.0.1\"") {
15 update reply {
16 Filter-Id += 'fail 1'
17 }
18 }
19
20 if ("%{pairs:Tmp-String-0}" != "Tmp-String-0 = \"This is a string\"") {
21 update reply {
22 Filter-Id += 'fail 2'
23 }
24 }
25
26 if ("%{pairs:Tmp-String-0[*]}" != "Tmp-String-0 = \"This is a string\", Tmp-String-0 = \"This is another one\"") {
27 update reply {
28 Filter-Id += 'fail 3'
29 }
30 }
31
32 if ("%{pairs:control:}" != "Cleartext-Password = \"hello\"") {
33 update reply {
34 Filter-Id += 'fail 4'
35 }
36 }
37
38 if ("%{pairs:control:User-Name}" != '') {
39 update reply {
40 Filter-Id += 'fail 5'
41 }
42 }