Debian Codegraph @

src/tests/keywords/if-regex-multivalue

raw
1 #
2 # PRE: update if
3 #
4 update {
5 control:Cleartext-Password := 'hello'
6 reply:Filter-Id := 'filter'
7 }
8
9 update request {
10 Cisco-AVPair := 'foo=bar'
11 Cisco-AVPair += 'bar=baz'
12 Cisco-AVPair += 'baz=foo'
13 }
14
15 if (&Cisco-AVPair[*] =~ /bar=(.*)/) {
16 if ("%{1}" != 'baz') {
17 update reply {
18 Filter-Id += 'Fail 1'
19 }
20 }
21 }
22 else {
23 update reply {
24 Filter-Id += 'Fail 2'
25 }
26 }